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

Sven Barth pascaldragon at googlemail.com
Wed Dec 25 23:34:50 CET 2013


Am 25.12.2013 22:44 schrieb "Jy V" <jyv110 at gmail.com>:
>
> Sorry Marco,
>
> On Wed, Dec 25, 2013 at 6:15 PM, Marco van de Voort <marcov at stack.nl>
wrote:
>>
>> There is no utf8 on Windows. One can try to mess with the
defaultcodepage,
>> but that will probably only force a different kind of problems.
>
>
> I cannot let you answer alone and make you appear as the only
knowledgeable reference for this important subject,
> it looks like defining default code page 65001 for Windows make it
perfect fit to handle UTF-8
> http://msdn.microsoft.com/en-us/library/dd317756%28VS.85%29.aspx

The Windows API *A functions use the system's (or more precisely user's)
code page set through the selected locale to convert ANSI to Unicode. So
even if you could set the system's codepage to UTF-8 (which you can not)
you'd need the user to change his/her codepage to UTF-8 which is a definite
no-go.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131225/99948616/attachment-0003.html>


More information about the Lazarus mailing list