- **Patch**: countdown --> push
- **Comment**:

Patch counted down - please push.



---

** [issues:#5833] Fix MinGW UTF-8 locale settings**

**Status:** Started
**Created:** Sat Mar 07, 2020 04:22 PM UTC by Masamichi Hosoda
**Last Updated:** Fri Mar 13, 2020 11:15 AM UTC
**Owner:** Masamichi Hosoda


Issue 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.

http://codereview.appspot.com/551580045


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/testlilyissues/issues/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/testlilyissues/admin/issues/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Testlilyissues-auto mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/testlilyissues-auto
  • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development

Reply via email to