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

Marcos Douglas md at delfire.net
Fri Dec 27 02:53:38 CET 2013


On Thu, Dec 26, 2013 at 1:04 PM, Marco van de Voort <marcov at stack.nl> wrote:
> On Thu, Dec 26, 2013 at 12:28:54AM +0100, Hans-Peter Diettrich wrote:
>> > is dangerous if they are not all the same encoding. If there is any
>> > mismatch, it will be converted down to default encoding.
>>
>> Then the implementation is wrong.
>
> Wrong according to you. Not wrong according to defined Microsoft
> applications.
>
> This way of top-down thinking will turn FPC into a Java, where you are
> lugging along an own platform-within-an-platform everywhere.
>
> IMHO this is not desirable.
>
>> > There is no utf8 on Windows.
>>
>> Yep, that's why the Unicode (W) API should be used. No problem with
>> UTF-8 strings there :-)
>
> If you totally drop Delphi compatibility you can do whatever you want. But
> IMHO that is more something for the Graeme's and Martin (MSEGUI's) of the
> world, not Lazarus.

Ok... but if FPC, on Windows, will be UTF-16 and Lazarus continues
using UTF-8 what is the difference?
This approach is not like Delphi. It has the RTL and VCL using the
same encode... FPC RTL and LCL will continue "fighting"!  :(

Marcos Douglas




More information about the Lazarus mailing list