[fpc-devel] Unicodestring branch, please test and help fixing

Daniël Mantione daniel.mantione at freepascal.org
Sat Aug 30 16:52:03 CEST 2008

Op Sat, 30 Aug 2008, schreef Marco van de Voort:

> In our previous episode, Michael Van Canneyt said:
>>> and back with
>>> svn switch http://svn.freepascal.org/svn/fpc/trunk
>> What happened to the idea of dynamical encoding ? And why utf-16 ? Unix
>> uses UTF-8 by default, which means that a conversion must be done each
>> time you interface to the OS ?
> I assume this means Tiburon UTF-8 extension to ansistring follows on this
> change.
> 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" :)


More information about the fpc-devel mailing list