That's a good idea Ralf, thank you :-) -----Original Message----- From: yunqa-bounce@xxxxxxxxxxxxx [mailto:yunqa-bounce@xxxxxxxxxxxxx] On Behalf Of Delphi Inspiration Sent: 03 May 2012 12:03 To: yunqa@xxxxxxxxxxxxx Subject: [yunqa.de] Re: New DIUnicode warning On 03.05.2012 11:36, Jon Burnham wrote: > So ... a few quotes from the conversation have me worried. I had > assumed that as long as the string 'input' was controlled (UTF8), then > RawByteString would handle it invisibly, but the implication is that > unless the RawByteString 'itself' is informed of a target codepage, > this is not guaranteed when it is consequentially read? TDIUnicodeReader.SetSourceBufferAsStrA uses RawByteString so string conversion never takes place: procedure TDIUnicodeReader.SetSourceBufferAsStrA( const ASourceStr: RawByteString; const AFileName: UnicodeString = ''); That aside, you can get around the entire string conversion issue if you read your data via the TStream interface: property TDIUnicodeReader.SourceStream: TStream This allows for exact binary representation of the data without string conversions. Most Internet components make data available as TStreams, but I don't know about RTC. Ralf _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa