MIME / IANA | Windows-31J |
---|---|
Alias(es) | CP943C |
Standard | WHATWG Encoding Standard (as "Shift_JIS") |
Language(s) | Japanese |
Classification | Extended ASCII,Variable-width encoding, CJK encoding |
Extends | Shift_JIS |
Microsoft Windows code page 932 (abbreviated MS932,Windows-932 or ambiguously CP932), also called Windows-31J amongst other names (see § Terminology below), is the Microsoft Windows code page for the Japanese language, which is an extended variant of the Shift JIS Japanese character encoding. It contains standard 7-bit ASCII codes, and Japanese characters are indicated by the high bit of the first byte being set to 1. Some code points in this page require a second byte, so characters use either 8 or 16 bits for encoding.
IBM offer the same extended double-byte codes in their code page 943 (IBM-943 or CP943), which is a combination of the single-byte Code page 897 and the double-byte Code page 941.
Microsoft's Shift JIS variant is known simply as "Code page 932" on Microsoft Windows, however this is ambiguous as IBM's code page 932, while also a Shift JIS variant, lacks the NEC and NEC-selected double-byte vendor extensions which are present in Microsoft's variant (although both include the IBM extensions) and preserves the 1978 ordering of JIS X 0208.
IBM's code page 943 (or "IBM-943") includes the same double byte codes as Windows code page 932. Microsoft's version corresponds closely to the encoding referred to as ibm-943_P15A-2003 (with aliases including CP943C and Windows-932) in International Components for Unicode (ICU). There is also a second ICU encoding named ibm-943_P130-1999, which uses different single-byte mappings which more closely match IBM's code page definitions. (See § Single-byte character differences below for details.)
Windows code page 932 is registered with the IANA as Windows-31J. The "Windows-31J" label is IANA's and not recognized by Microsoft, which has historically used "shift_jis" instead. The W3C/WHATWG encoding standard used by HTML5 treats the label "shift_jis" interchangeably with "windows-31j" with the intent of being "compatible with deployed content" and matches Windows code page 932 (including the "formerly proprietary extensions from IBM and NEC").