[fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?
Marco van de Voort
marcov at stack.nl
Fri Sep 26 11:10:18 CEST 2008
In our previous episode, Michael Schnell said:
> > It's no different then UTF-16 if you want to do it properly. In both you
> > have to look out for surrogates.
> >
> Is UTF-16 Widestring in FPC (and Delphi 200x ? ) not done just ignoring
> the surrogates ?
No different as UTF-8 in principle. Base routines keep surrogate pairs
intact if you don't use them wrongly.
>(AFAI understand, a Widechar is just 16 bit, it would
And a char is 8 -bit the granularity of UTF-8 without surrogates. IOW it is
orthogonal.
> need to be 32 bit if surrogates were allowed in Widestrings).
No it doesn't, Windows supports surrogates, and so does afaik Tiburon. It is
just that they chose the granularity of [] to be the granularity of the
encoding rather than char based.
More information about the fpc-devel
mailing list