[Lazarus] Does Lazarus support a complete Unicode Component Library?
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Feb 24 11:57:19 CET 2011
Op 2011-02-24 12:36, Felipe Monteiro de Carvalho het geskryf:
>
> Indeed, I hadn't thought about that. That makes the case for a general
> migration to the new string type stronger.
Correct. The generic String type will have a slightly new
meaning/functionality in the future.
> And if we are going to make such a large scale incompatible
> transition,
I really don't see much of an issue here. Simply continue using String
as normal, and just like Delphi, don't expect mystring[i] to return
something very useful like it does for AnsiString types. In the later
case, rather use a Unicode Char Iterator or something.
> then at least we should make it compatible with the new
> Delphi.
I can't see how, or rather exactly what that would entail. For one, I
haven't used Delphi in a day-to-day basis, since Delphi 7, so I have no
clue how Delphi's Unicode support works, other than reading a website
article here and there. I also don't intend to buy Delphi any time soon,
just to learn how to improve FPC. Also under Delphi, mystring[i] returns
a Char (or WideChar I think) which is now 2-bytes large. Under FPC that
would be dependant on the platform you are targeting I would think.
Remember the plan is to use the native encoding of each platform... So
under Linux and Mac the String's encoding will be UTF-8 by default, and
under Windows it will be UTF-16 by default, DOS will be US-ASCII etc...
So we definitely can't be a 100% Delphi clone in this regard!
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
More information about the Lazarus
mailing list