[Lazarus] UTF8String and UTF8Delete

Jürgen Hestermann juergen.hestermann at gmx.de
Sat Dec 12 18:40:03 CET 2015


Am 2015-12-12 um 18:20 schrieb Sven Barth:
> Yes, internally Windows uses UTF-16, but if you set your Windows Ansi code page or at least the current thread's locale to UTF-8 (indirectly by choosing a locale that has UTF-8 as code page, I don't know one right now though) then the *A functions *do* work with UTF-8, simply because they use the current locale's code page to convert from Ansi to Unicode and in this case Ansi includes UTF-8.
If that would be true then we could simply switch the Windows (API)
interface to UTF-8 and nobody needs to worry about code pages anymore.
I doubt that this can be done.

How do you set the Win API interface to now
expect UTF-8 strings in all *A functions?
Any link?






More information about the Lazarus mailing list