Content deleted Content added
Artoria2e5 (talk | contribs) →Windows NT based systems: You can't accidentally call the "A" API when it's #define'd to "W". |
Artoria2e5 (talk | contribs) |
||
Line 26:
* Explicit conversion functions such as MultiByteToWideChar
* A manual "chcp" command that only changes the code page for the current program's context.
** This is used for [[conhost.exe]] windows running [[Windows Subsystem for Linux]]. It is known to confuse [[CPython]] 2 installations on Windows with a "cp65001" encoding. A workaround is to "chcp" to a known code page, run the program, and then "chcp" back to 65001.<ref>{{cite web|title=Unknown encoding: 65001 · Issue #2009 · Microsoft/WSL|url=https://github.com/Microsoft/WSL/issues/2009|website=GitHub|accessdate=9 May 2018|language=en}}</ref>
Since insider build 17035 and the April 2018 update (nominal build 17134) for Windows 10, a "Beta: Use Unicode UTf-8 for worldwide language support" checkbox is available for setting the locale code page to UTF-8.{{efn|1=Found under control panel, "Region" entry, "Administative" tab, "Change system locale" button.}} However, this option can break "narrow" functions such as <code>fopen()</code> in legacy applications as many of them assume that all MBCS code pages are DBCS (double-byte). In fact, all "locales" available from the control panel dropdown are at most double-byte, and code pages with more bytes such as [[GB 18030]] (cp54936) and [[UTF-8]] has been unavailable for selection from the dropdown list.
|