On Fri, Sep 26, 2008 at 10:43 AM, Michael Schnell <[EMAIL PROTECTED]> 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/ _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel