DescriptionIssue 5833/3: Doc: Add handling Unicode filenames on Windows to changes
Issue 5833/2: Add workaround for MinGW UTF-8 stat issue
When UTF-8 process locale is active,
LilyPond could not find some Unicode filenames.
`stat ()` in msvcrt.dll returns `-1` (i.e. error) with some UTF-8
filenames even if process code page is UTF-8 and the file exists.
So we get the process code page with `GetACP ()` and, if it is UTF-8,
convert the filename to wide strings and use `_wstat ()`.
If Universal CRT (UCRT, newer than msvcrt.dll) is used
(i.e. `_UCRT` is defined), no such workaround is needed.
Issue 5833/1: Add workaround for MinGW UTF-8 locale settings issue
Issue 2173 and 5828 activates UTF-8 process locale on Windows.
They allow LilyPond for Windows to use Unicode filenames.
However, when LilyPond outputs Unicode strings to tty, it garbled.
`setlocale (LC_ALL, "")` in msvcrt.dll sets user-defined ANSI code page
(i.e. 437 for English, 932 for Japanse, etc.)
even if process code page is UTF-8 (i.e. 65001 for all languages).
With this setting, outputting UTF-8 string becomes garbled.
So we get the process code page with `GetACP ()` and,
if it is UTF-8, explicitly set locale's code page to UTF-8 (i.e. 65001).
If Universal CRT (UCRT, newer than msvcrt.dll) is used
(i.e. `_UCRT' is defined), no such workaround is needed.
Patch Set 1 #Patch Set 2 : more workaround #
MessagesTotal messages: 3
|