Unicode in Microsoft Windows: Difference between revisions

Content deleted Content added
UTF-8: reword, mention programs can change their own cp but not the locale cp
UTF-8: Delete mention of what explicitly does not work. You cannot change the "code page" to UTF-8
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 them 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>