On 12.12.2015 18:40, Jürgen Hestermann wrote:
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?

I'll come back to you regarding this. It *is* possible, but it is not feasible - which is why it isn't used more - and I'm currently a bit too busy to write an example...

Regards,
Sven


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to