Unicode in Microsoft Windows: Difference between revisions

Content deleted Content added
A program can change it for itself, but not for the entire system locale's "codepage for non-Unicode programs" || rvv 835991480
Line 18:
 
== UTF-8 ==
Although the locale can be set so the 'M' encodings handle ''some'' multi-byte encodings, it is not possible to set thema locale to use [[UTF-8]] ([[code page 65001]]) which is only used for explicit conversion functions such as MultiByteToWideChar. The code page can however be set manually by a program for itself, e.g. via <code>chcp</code> in [[cmd.exe]]. As many libraries, including the standard C and C++ library, only allow access to files using the 'M' API, it is not possible to open all Unicode-named files with them. Thus Unicode is not supported by Windows in software using a portable API.
 
There are proposals to add an API to portable libraries such as [[Boost (C++ libraries)|Boost]] to do the necessary conversion, by adding new functions for opening and renaming files. These functions would pass filenames through unchanged on Unix, but translate them to UTF-16 on Windows.<ref>{{cite web|url=http://cppcms.com/files/nowide/html/|title=Boost.Nowide}}</ref>