This article needs additional citations for verification. (June 2011) |
Microsoft started to consistently implement Unicode in their products quite early.[clarification needed] Windows NT was the first operating system that used "wide characters" in system calls. Using at first UCS-2 encoding scheme, it was upgraded to UTF-16 starting with Windows 2000, allowing a representation of additional planes with surrogate pairs.
In various Windows families
Windows NT based systems
Modern operating systems Windows XP and Windows Server 2003, and prior to them as Windows NT 4 and Windows 2000 are shipped with the system libraries, which supported string encoding of two types: UTF-16 (often called "Unicode" in Windows documentation) and an 8-bit encoding called the "code page" (or incorrectly referred to as ANSI code page). 16-bit functions have names suffixed with -W (from "wide"), for example, lstrlenW(). Code page oriented functions uses suffix -A, e.g., lstrlenA(), for "ANSI". This split was necessary because many languages, including C, do not provide a clean way to pass both 8-bit and 16-bit strings to the same api or put them in the same structure. Windows also provides the 'M' API which in some locales provided multi-byte encodings, but in most locales is the same as 'a'. Most of such "A" and "M"-functions are implemented as a wrapper that translates the code page to UTF-16 and calls the "W" functions.
The IsTextUnicode
function uses a heuristic algorithm on a byte string passed to it to detect whether this string represents UTF-16 text. For very short texts, this function, used by some applications like Notepad, often gives incorrect results. This gave rise to legends about the existence of "Easter eggs" like Bush hid the facts.
Windows CE
In Windows CE UTF-16 was used almost exclusively, with the "A" api mostly missing.
This section needs expansion. You can help by adding to it. (June 2011) |
Windows 9x
In 2001, Microsoft released a special supplement to Microsoft’s old Windows 9x systems. It includes a dynamic link library unicows.dll (only 240 KB) containing the 16-bit flavor (the ones with the letter W on the end) of all the basic functions of Windows API.
UTF-8
UTF-8 and conversions to and from a multitude of other encodings, including UTF-16 and even UTF-7 are fully supported since Windows 2000.[1]
References
- ^ "MultiByteToWideChar function (Windows)". Microsoft Corporation. Retrieved 2015-05-13.