-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows unicode support #666
windows unicode support #666
Conversation
… it can handle unicode on windows.
I believe we could set the process code page to UTF-8 to simplify cross-platform code: https://docs.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page |
Ah, interesting, so we must have been doing something wrong because this wasn't working. I'll investigate this approach - it could be a heck of a lot easier :-) But they say it only works on Windows 10 1903 and above. Presumably you are ok with that restriction. |
We should ask @leodemoura as well, but if it significantly simplifies the code, I definitely would be :) . One caveat is that we would have to add the manifest to user-defined Lean executables as well, though perhaps that is a good thing to do for modern Windows binaries in general? For example, we might also want to activate |
note: my "legacy api" version of unicode support has given me an interesting tour through the build system :-) |
I am happy too :) |
I looked into it and found the following:
But I did a quick proof of concept hacking lean.exe using a visual studio tool "mt.exe" as follows:
The resulting executable can load a file containing a unicode path like But the question is how to integrate this into the process...? I'm also a bit concerned because after editing the file like this,
|
Phew! That doesn't sound pleasant. Is this GCC-only though? We used to use clang on all platforms until we recently had to switch to GCC on Windows because of a miscompilation. But I just found out that |
See new simpler solution: #668 |
PS: the mt.exe breaking the .exe is a real problem, so the new solution does not use mt.exe. |
Reading unicode files on Windows doesn't work: