[Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Dec 16 18:22:13 CET 2013


On Mon, 16 Dec 2013 13:43:41 -0200
Marcos Douglas <md at delfire.net> wrote:

>[...]
> > The problem is not specific to the LCL. The problem is using libraries
> > with different encodings.
> 
> Of course!
> But I'm using Lazarus and... LCL... so, I'm searching a better way to
> continue programming without concern about these problems -- at least
> decrease.

You are not alone.

 
> Just for clarify: I'm not judging the LCL or whatever. I'm only
> searching a solution to my problems. If I can help the Lazarus team,
> in a near future, would be great.

You are welcome.
The LCL uses one encoding on all platforms, while still using native
widgetsets and native file handles. That was already a big step to
decrease the amount of conversions. And many packages using the LCL
followed that approach. That further decreased conversions.
The big missing piece in the puzzle is the RTL. Now FPC has extended
'string' and is adapting the RTL for unicode.
Of course this does not magically solve the general problem. All
libraries must be adapted including the LCL.


> >> Question:
> >> After the new FPC version is released, how Lazarus will work together
> >> "FPC Unicode"?
> >
> > What do you mean with "FPC Unicode". The new compiler feature
> > of strings with encoding and various changes to the RTL or the idea to
> > release a FPC flavor with dotted unitnames and String=UnicodeString?
> 
> I mean "new compiler feature of strings with encoding and various
> changes to the RTL".
> Lazarus will change something? Will use "FPC new feature of strings"
> or continues using UTF8?

One of the new FPC strings is UTF8String. So for compatibility the
first step is to use that. That is not yet complete.

Mattias




More information about the Lazarus mailing list