[Lazarus] Any chance of changing the LCL Unicode encoding to UTF-16?
Marco van de Voort
marcov at stack.nl
Sun Aug 3 12:43:56 CEST 2008
On Sat, Aug 02, 2008 at 01:34:29PM -0300, Luiz Americo Pereira Camara wrote:
> This is just a question not a request.
>
> In the recent discussion about fpc support to unicode it seems that
> delphi compatibility is a must for fpc and since delphi will use UTF-16
> as the main encoding in the next release, probably fpc will follow it.
This is not true. All options are still open, and currently it is highly
unlikely that FPC won't be able to support multiple encodings in one binary.
To anybody that wants to start with unicode before that,
Note also that uptake of Tiburon is not known yet. Till now, the 200x
versions haven't been that popular, it will be interesting what major
features like this unicode support and generics do to that.
> So, any chance of changing the LCL Unicode encoding to UTF-16?
That is not sane. I think if you are going to make assumptions,
unicodestring being *DEFAULT* utf-8 on Linux and utf-16 on windows (or
whatever native encoding the respective platform has) is the more likely
outcome.
Maybe Tiburon code can kept working by adding extra {$H+/-} like directives,
but this is all pending the Tiburon release, and the increase of knowledge
about it. If this works, this means that UTF16-only tiburon code might be
mixed with UTF8 Unix LCL code.
> I'm asking this because i develop a component (VirtualTreeView) that
> uses WideString/UTF-16 to support unicode and i'm planning to switch to
> UTF-8. If LCL change to UTF-16 it will be lost of time.
The best thing to say is the age old truth that people that abstract it to
switch either way, hurt themselves less when it goes the other way. IOW try
to avoid to make a choice for encoding.
Again, currently the official state is *WAIT*. These are major decisions and
shouldn't be made rash or with a lack of information.
More information about the Lazarus
mailing list