[Lazarus] rangtree2.lgo

pewtas at gmail.com pewtas at gmail.com
Sun Aug 3 17:22:15 CEST 2008


On Sun, Aug 3, 2008 at 1:36 AM, Martin Friebe <lazarus at mfriebe.de> wrote:
> IMHO, it would be best if a string knew it's encoding.
>
> AFAIK, at the moment a string is prefixed by a record, containing data
> such us the amount of allocated mem, and a ref-count.
> This should include a field encoding. Then you could always request the
> string in the encoding you need, and it would be converted if needed.

This is exactly what my Russian friend suggested in the fpGUI
newsgroups.  We already use a fpGUI specific string type (type
TfpgString = String). So if we had the encoding option we could simply
change that string type definition to TfpgString = String[(utf8)] and
continue assuming inside fpGUI that we are working with UTF-8 encoded
strings. Well, something like that.

PS:
I know the new Delphi is going to have some feature like that,
specifying the encoding. But I don't know the syntax or how FPC plans
to handle this.


Regards,
 - Graeme -


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



More information about the Lazarus mailing list