[fpc-pascal] Unicode strings

Juha Manninen juha.manninen62 at gmail.com
Fri Dec 31 13:04:17 CET 2010


Marco van de Voort kirjoitti perjantai 31 joulukuu 2010 13:04:27:
> In our previous episode, Jonas Maebe said:
> > Delphi's UnicodeString supports holding strings with arbitrary encodings
> > (not just UTF-16), along with transparent re-coding of strings when
> > assigning them to unicodestrings whose codepage has been statically
> > defined at compile time.
> 
> This is afaik not true, or ill formulated. The D2009+ unicodestring type is
> much like FPC 2.4's Unicode string or Kylix and older FPC's non COM
> Widestring (refcounted 2-byte type) , it is the ansistring type (1-byte
> type) that gets codepage support.

UTF-16 needs codepages, too.
I think only the 4-byte char type (is it UTF-32) would solve all encoding 
problems. All characters of all languages fit into 2^32 space.

Juha



More information about the fpc-pascal mailing list