Unicode in Microsoft Windows: Difference between revisions

Content deleted Content added
UTF-8: Corrected the comment about code page 65001 in relation to MultiByteToWideChar
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 support [[UTF-8]] (attempts to use the locale id, [[code page 65001]], passedare toingored—this MultiByteToWideCharcode page is only used for UTF-8explicit areconversion ignoredfunctions such as MultiByteToWideChar). 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>