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

Reply via email to