Thanks Ralf. BTW, do you have plans for a JSON component ? You should be 85% there with what you already produce. -----Original Message----- From: yunqa-bounce@xxxxxxxxxxxxx [mailto:yunqa-bounce@xxxxxxxxxxxxx] On Behalf Of Delphi Inspiration Sent: 18 February 2012 16:32 To: yunqa@xxxxxxxxxxxxx Subject: [yunqa.de] Re: CSVParser question On 18.02.2012 10:04, Jon Burnham wrote: > Does this mean that you have to set the encoding as mandatory - that > there is no default ? DIUnicode's default encoding is Latin-1 for both reading (TDIUnicodeReader) and writing (TDIUnicodeWriter). Latin-1 "is by far the most popular 8-bit character set in the world, and virtually every character set in modern use shares some similarity to it (for instance it defines the first 256 code point assignments in Unicode)" [http://en.wikipedia.org/wiki/Latin_1 on 2012-02-18]. So Latin-1 will probably cover most your data. But since differences between character sets are subtle, I recommend careful checks to avoid decoding errors. Unfortunately, there is no reliable way to determine an 8-bit string's character set or encoding automatically. Just UnicodeStrings / WideStrings are known to be UTF-16LE encoded if used properly. See the source example in my previous message for how to set up TDIUnicodeReader to cover both Unicode and non-Unicode Delphis. Ralf _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa