[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 09:34:44 CEST 2008


On Fri, Sep 26, 2008 at 9:19 AM, Aleksa Todorovic <alexione at gmail.com> wrote:
> I support decision of using UTF-16 over UTF-8. String processing is
> far more simpler, it's actually as simple as it should be.

And that's guarenteed to work with surrogate pairs as well? The
problem is, most people assume UTF-16 = UCS2 and never both to check
if surrogate pairs are well supported - irrespective if most languages
incidentally fall in the BMP.

> Have you
> ever done any serious processing using UTF-8? It's not nightmare, but
> it's surely real pain. No such problems with UTF-16. You don't need to
> thing about encodings & conversions all the time.

Well if you have Utf-8 versions of all basic string processing
functions like Pos, Length, Copy, Insert etc you don't have to think
of encoding or anything. fpGUI uses UTF-8 internally, and I never have
to think about what encoding I'm working with. I assume Lazarus LCL is
the same.

Regards,
  - Graeme -


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



More information about the fpc-devel mailing list