-
Enhancement
-
Resolution: Fixed
-
P4
-
18
-
b15
A while ago there was a discussion around JDK-8263028 where it seems that one of the issue was caused by the code page setting on the build system.
At the time we tried a few things, but didn't find a way to set the code page used by MSVC explicitly.
Now, when looking at character encodings again, I've stumbled upon the options `/execution-charset` [1] and `/source-charset` [2], which seems to allow setting the code page when invoking the compiler with e.g.
/execution-charset:.437 /source-charset:.437
To force the used code page to be the same as on a Windows system with the English locale set as system locale.
Maybe it could be considered to use these flags to avoid code page problems in the future.
FWIW, GCC and Clang seem to have equivalent options under the names `-finput-charset` and `-fexec-charset`.
MSVC also has the option /utf-8 to set both charsets to utf-8, so maybe UTF-8 could be adopted as the official encoding for both (AFAICS, UTF-8 is the default used by GCC and Clang).
[1] : https://docs.microsoft.com/en-us/cpp/build/reference/execution-charset-set-execution-character-set?view=msvc-160
[2] : https://docs.microsoft.com/en-us/cpp/build/reference/source-charset-set-source-character-set?view=msvc-160
At the time we tried a few things, but didn't find a way to set the code page used by MSVC explicitly.
Now, when looking at character encodings again, I've stumbled upon the options `/execution-charset` [1] and `/source-charset` [2], which seems to allow setting the code page when invoking the compiler with e.g.
/execution-charset:.437 /source-charset:.437
To force the used code page to be the same as on a Windows system with the English locale set as system locale.
Maybe it could be considered to use these flags to avoid code page problems in the future.
FWIW, GCC and Clang seem to have equivalent options under the names `-finput-charset` and `-fexec-charset`.
MSVC also has the option /utf-8 to set both charsets to utf-8, so maybe UTF-8 could be adopted as the official encoding for both (AFAICS, UTF-8 is the default used by GCC and Clang).
[1] : https://docs.microsoft.com/en-us/cpp/build/reference/execution-charset-set-execution-character-set?view=msvc-160
[2] : https://docs.microsoft.com/en-us/cpp/build/reference/source-charset-set-source-character-set?view=msvc-160
- relates to
-
JDK-8264425 Update building.md on non-English locales on Windows
-
- Resolved
-