-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Unicode support on Windows? #68
Comments
|
What version of windows were you running on? The reason I ask is that I thought that |
Oh, and I don't seem to be receiving messages from github. Windows 10 19044, I think that's new enough. |
There's a manifest thing to do to enable that apparently: https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page Did you happen to try it? I'd be curious to know if it works |
The manifest is indeed needed, not sure how I managed to fumble my previous test. I'll give subprocess with UTF8 command lines a try in the following days and let you know how it went. |
Hi, @jlaumon Thank you for following this. This issue has been raised for some time now. I have now replaced it with |
If someone wants to put together a PR that passes CI I'd happily accept it. |
I just tried subprocess on xcopy.exe to copy file/directory names with non-ascii characters in UTF-8 and, as long as that magic manifest is there, it just works! I am now the proud owner of 🍌.txt and 🍌_copy.txt. |
UTF-8 support on Windows is still beta and does not work by default (at least with localized envrionments for some Asian languages.) But for a cross-platform single-header library, it's not desirable that behavior changes depending on external factors (including manifest files,) I think. As far as I know, common cross-platform libraries use the wchar version of APIs with |
Working with character encoding on Windows is really annoying.
Passing UTF-8 characters on the command line using
CreateProcessA
seems to be impossible. While local code pages seem to be able to handle special characters such as Chinese and Japanese, they don't seem to be able to do that for emoji.In my case, the way I use it is to convert your
commandLineCombined
to UTF16LE characters and then callCreateProcessW
. My original input was UTF8 characters, and this modification seems to handle UTF8 characters properly.What do you think of this? Thanks.
The text was updated successfully, but these errors were encountered: