Unicode in Microsoft Windows: Difference between revisions

Content deleted Content added
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 [[PythonCPython]] 2 installations on Windows with a "cp65001" encoding.<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.