On Sun, 14 May 2006 17:56:13 -0300
"Felipe Monteiro de Carvalho" <[EMAIL PROTECTED]> wrote:
> On 5/14/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> > The question is: should the LCL use the 'native' string type and let the
> > applications write three times the code. Or should the LCL use UTF-8 and
> > map internally in the interfaces and let the applications write once and
> > compile anywhere.
>
> Today it uses native strings. Then people need to set strings by code,
> and not using the IDE, and do something like this:
>
> {$IFDEF LCLGtk2}
> set utf-8 strings
> {$ELSE}
> set iso strings
> {$ENDIF}
AFAIK gtk, gtk2, carbon, qt and wince use UTF-8. So basically you test
{$IFDEF LCLwin32}
set iso strings
{$ELSE}
set utf-8 strings
{$ENDIF}
> This isn't the end of the world, but is somewhat inconvenient.
>
> To answer which system is better, it is necessary to compare the
> overhead with the benefits.
>
> It would be nice to calculate what exactly is the overhead produced by
> the string conversion. Considering that you mostly set the strings of
> your GUI only once, it probably isn't relevant for most uses.
Don't forget the overhead by creating messages. This is almost always bigger
than the short strings.
I only see a potential problem with the TStrings. But as you said: Someone
must compare.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives