[fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Sep 26 10:50:43 CEST 2008


On Fri, Sep 26, 2008 at 10:43 AM, Michael Schnell <mschnell at lumino.de> wrote:
>
>> 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 ?

Lets hope not, because then it would be UCS-2 and NOT UTF-16! As far
as I know D2009 (I think) handles this correctly, but I have no idea
how.

> (AFAI understand, a Widechar is just 16 bit, it would need to
> be 32 bit if surrogates were allowed in Widestrings).

Good question and I have been wondering about this myself.  In D2009
SizeOf(Char) = 2, so I have no idea how that works with surrogate
pairs. Can anybody explain this please?


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list