Text - Does Windows use UTF-16 or UCS-2?

Windows uses UTF-16. Previously, it used UCS-2.


UTF-16

Support for UTF-16 was added in Windows 2000.
UTF-16 is a variable width 2-byte or 4-byte character encoding for Unicode.

UCS-2

(workstation & server) Support for UCS-2 was added in Windows NT 3.1.
(consumer) Support for UCS-2 was added in Windows 95.
UCS-2 is a fixed width 2-byte character encoding for Unicode.


Windows NT 3.1 (July 27, 1993) was the first version of Windows with full native support for Unicode.
  • Internally, all characters and strings are Unicode.
  • The Wide version of the Win32 API is fully implemented.
  • The Ansi version of the Win32 API is implemented by calling the Wide version (after conversion).

Windows 95 (August 24, 1995) was the first consumer version of Windows with support for Unicode.
Unlike Windows NT, Unicode was implemented as a layer over Ansi.
The technology was called MSLU (MicroSoft Layer for Unicode) and was implemented in Unicows.dll.
  • Internally, all characters are Ansi.
  • The Wide version of the Win32 API is implemented by calling the Ansi version (after conversion).

Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath