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
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to