-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 (native build) codepage issues #1473
Comments
Thanks for reporting this. I think there’s likely two possible fixes; one where we transcode the native path to UTF-8 first, and one where we don’t do that. I’m curious what happens for Java, which uses UTF-16 strings for paths. It might just work because it does string encoding before it makes system calls. |
Windows, same code, JVM target, JVM 17, all seems to be OK |
I think I should note that cp1251 is locale-dependent codepage and may be changed by user in "Administrative Locale Settings". Current codepage can be retrieved using GetACP call. |
Java uses API that accepts UTF-16 strings ( |
Example code:
Provided code creates directory named
тестовая строка
(cp1251 represenation of utf-8 string) instead ofтестовая строка
.This applies to other functions as well:
FileSystem.SYSTEM.exists()
,FileSystem.SYSTEM.write()
, etc.Tested on Windows 11 and Windows 10. "Unicode (beta)" in "Administrative Locale Settings" should be off.
When "Unicode beta" in "Administrative Locale Settings" is on, the issue is not reproducible.
The text was updated successfully, but these errors were encountered: