[fpc-devel] utf8 reading

Uberto Barbini uberto at ubiland.net
Thu Mar 10 18:35:01 CET 2005


> > utf-8 is a unicode string. What do you mean with "not escaped"
> > Unicode? Memory wasting utf-32?
>
> I'd see UCS2/UCS4 as not escaped Unicode.

Exactly.
I think that UCS2 will suffice to everyone not interested in Vogon poetry! ;))
This means to have 2 byte chars and related strings, all string functions made 
compatible and function to import/export to utf-8 and charset strings.

Another way is to use a flag to force all string to be compiled as UCS2 (or 
UCS4 for Vogon poets).

Using natively utf-8 I think is impossible, because the encoding.

Please note that at every Borland conference there is someone asking for 
Unicode support since Delphi2...

There are several opensource library for managing unicode strings in delphi 
but they are implemented as standard classes, not refcounted first class 
citizen as long-string.

Bye Uberto





More information about the fpc-devel mailing list