[fpc-devel] Unicodestring branch, please test and help fixing
Luiz Americo Pereira Camara
pascalive at bol.com.br
Sun Aug 31 15:51:09 CEST 2008
Daniƫl Mantione wrote:
> Op Sat, 30 Aug 2008, schreef Marco van de Voort:
>
>> So then you can (hopefully) pretty much do
>>
>> {$ifdef unix} // in reality it is more complicated than ifdef unix,
>> but for
>> now..
>> TNativeString = type ansistring (CP_UTF8);
>> {$else}
>> TNativeString = type TUnicodeString;
>> {$endif}
>>
>> And use TNativeString for encoding agnostic purposes.
>
> Well, really agnostic code should simply use "string" :)
Delphi is introducing the RawByteString type, that skips the auto
encoding conversion. I don't know where it fits in the upcoming unicode
schema. Anyway there's an example how to use it:
http://www.micro-isv.asia/2008/08/using-rawbytestring-effectively/
Luiz
More information about the fpc-devel
mailing list