[fpc-pascal] Re: Widestrings length and character iteration
daniel.mantione at freepascal.org
Tue May 8 10:01:03 CEST 2007
Op Mon, 7 May 2007, schreef Christos Chryssochoidis:
> Daniël Mantione wrote:
> > Not possible, a widestring is UCS-2/UTF-16.
> I defined a widestring with 7 characters (code points), and the length()
> function returned the value 15. Of the 7 code points of that widestring only
> one of them was greater than $07FF (the maximum code point which can be
> encoded in 2 bytes under UTF-8). When I changed that character with another
> one with code not greater than $07FF, length() returned value 14... I also
> printed the byte values of one of the widestring's widechars, and the values
> printed indicated UTF-8 encoding.
Yes, the program output is utf-8 on OS-X, because this is the native
encoding for OS-X. However, widestrings are not utf-8. Can you show your
More information about the fpc-pascal