[Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
Marcos Douglas
md at delfire.net
Tue Dec 17 02:41:34 CET 2013
On Mon, Dec 16, 2013 at 3:22 PM, Mattias Gaertner
<nc-gaertnma at netcologne.de> wrote:
> 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.
I think use one encoding on all platforms is good, however Windows
uses UTF-16. All string from/to Windows needs to be converted, right?
Is this not a penalty for Windows platform?
What coding FPC's team chose to use on Windows in the next release of
the compiler, UTF-16?
> Of course this does not magically solve the general problem. All
> libraries must be adapted including the LCL.
Of course.
>> >> 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.
Lazarus uses only 'string', not UTF8String, UnicodeString,
RawByteString, etc. This will change?
Marcos Douglas
More information about the Lazarus
mailing list