[fpc-devel] Unicode support (again)

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Nov 11 19:08:33 CET 2008


On Tue, 11 Nov 2008 17:09:37 +0100
Michael Schnell <mschnell at lumino.de> wrote:

> 
> > AFAIK no one measured a noticeable speed difference between UTF8/16
> > when handling GUI.
> >   
> So I don't understand why the LCL designers for the unicode upgrade 
> decided to use an UTF8 API instead of a WideString API (like MSEGUI
> does seemingly successfully).

- both UTF-8 and UTF-16 has multi character problems and lazarus should
support the full unicode (at least it should not be limited by design).
That's why arguments that widestrings are easier, because you can use
UCS-2 tricks, are irrelevant concerning the LCL.
- we made some tests and didn't found any speed gain/loose concerning
LCL.
- Compatibility with existing code (var parameters) (MSEGui does not
have this problem)
- widestrings had some bugs at the time and were not reference counted
(Martin did a great job over the years to improve that)
- at the time (four years ago) there was no one with enough time and
compiler knowledge to extend fpc.
- We had not the manpower to do both

Speaking for myself: I'm glad for the decision for UTF-8. So far I had
much more problems with widestrings than with UTF-8 ansistrings.

Of course, I expect that the pressure for D2009 compatibility rises.
And if the FPC team decides to create a unicode-able RTL with UTF-16
for windows, then maybe the LCL will be extended/changed to support
that. Knowing the FPC devels this can take years or a weekend. ;)


Mattias



More information about the fpc-devel mailing list