HOME

TheInfoList



OR:

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 is spoken natively by about 128 million people, primarily by Japanese people and primarily in Japan, the only country where it is the national language. Japanese belongs to the Japonic or Japanese- Ryukyuan language family. There have been ...
, which is an extended variant of the
Shift JIS Shift JIS (Shift Japanese Industrial Standards, also SJIS, MIME name Shift_JIS, known as PCK in Solaris contexts) is a character encoding for the Japanese language, originally developed by a Japanese company called ASCII Corporation in conjuncti ...
Japanese
character encoding Character encoding is the process of assigning numbers to Graphics, graphical character (computing), characters, especially the written characters of Language, human language, allowing them to be Data storage, stored, Data communication, transmi ...
. It contains standard 7-bit
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
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. Windows-31J is the most used non-
UTF-8 UTF-8 is a variable-length character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode'' (or ''Universal Coded Character Set'') ''Transformation Format 8-bit''. UTF-8 is capable of ...
/Unicode Japanese encoding on the web. Actually is the much more declared encoding, but by W3C/WHATWG HTML standards, the encodings are declared the same, and while the latter name is used in the standards it's defined to decode the former. See page for statistics.


Terminology

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 International Components for Unicode (ICU) is an open-source project of mature C/ C++ and Java libraries for Unicode support, software internationalization, and software globalization. ICU is widely portable to many operating systems and environ ...
(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 The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
/
WHATWG The Web Hypertext Application Technology Working Group (WHATWG) is a community of people interested in evolving HTML and related technologies. The WHATWG was founded by individuals from Apple Inc., the Mozilla Foundation and Opera Software, l ...
encoding standard used by
HTML5 HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
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"). Windows code page 932 is also called MS_Kanji, although IANA treat MS_Kanji as an alias for standard Shift JIS.
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
, for example, uses the label MS-Kanji (or cp932) for Windows-932 and the label Shift_JIS (or sjis) for JIS X 0208-defined Shift JIS, without recognising the Windows-31J label. In Japanese editions of Windows, this code page is referred to as "ANSI", since it is the operating system's default 8-bit encoding, even though
ANSI The American National Standards Institute (ANSI ) is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organi ...
was not involved in its definition.


Differences from standard Shift JIS

Windows-31J is often mistaken for standard Shift JIS (as defined in
JIS X 0208 JIS X 0208 is a 2-byte character set specified as a Japanese Industrial Standards, Japanese Industrial Standard, containing 6879 graphic characters suitable for writing text, place names, personal names, and so forth in the Japanese language. Th ...
:1997 Appendix 1): while similar, the distinction is significant for computer programmers wishing to avoid
mojibake Mojibake ( ja, 文字化け; , "character transformation") is the garbled text that is the result of text being decoded using an unintended character encoding. The result is a systematic replacement of symbols with completely unrelated ones, oft ...
.


Double-byte character differences

In addition to the standard
JIS X 0201 JIS X 0201, a Japanese Industrial Standard developed in 1969 (then called JIS C 6220 until the JIS category reform), was the first Japanese electronic character set to become widely used. It is either a 7-bit encoding or an 8-bit encoding, altho ...
:1997 and
JIS X 0208 JIS X 0208 is a 2-byte character set specified as a Japanese Industrial Standards, Japanese Industrial Standard, containing 6879 graphic characters suitable for writing text, place names, personal names, and so forth in the Japanese language. Th ...
:1997 characters, Windows-31J includes several JIS X 0208 extensions, namely " NEC special characters (Row 13), NEC selection of IBM extensions (Rows 89 to 92), and IBM extensions (Rows 115 to 119)", in addition to setting some encoding space aside for end user definition. This also differs from IBM-932, which does not include the NEC extensions or NEC selection. The IBM extensions were designed to encode characters from the IBM Japanese DBCS-Host repertoire which were initially absent in JIS X 0208; the 'because' sign ∵ and 'not' sign ¬ were later added to JIS X 0208 itself in 1983, and Microsoft includes them at extension locations as well as their 1983 locations. The NEC extensions also encode the entirety of the IBM repertoire, but in a separate extension within the 94×94 JIS X 0208 grid (in rows 89–92, besides the characters already included in NEC row 13), rather than using Shift JIS codes beyond the JIS X 0208 range; Windows code page 932 includes these 388 characters in both locations. As a result, the because and not signs are encoded three times. Some of these representations were subsequently used for different characters by
JIS X 0213 JIS X 0213 is a Japanese Industrial Standard defining coded character sets for encoding the characters used in Japan. This standard extends JIS X 0208. The first version was published in 2000 and revised in 2004 (JIS2004) and 2012. As well as a ...
and Shift JIS-2004. For example, compare row 89 in JIS X 0213 (beginning 硃, 硎, 硏…) to row 89 as used by JIS X 0208 with IBM/NEC extensions (beginning 纊, 褜, 鍈…). Consequently, Shift JIS-2004 is not compatible with Windows-31J. In addition to the above, Microsoft uses different (but visually similar) Unicode mapping for several double-byte punctuation characters compared to standard Shift JIS, such as the wave dash being mapped to U+FF5E rather than U+301C, which is followed by ibm-943_P15A-2003 but not ibm-943_P130-1999, and using different mapping for the double byte backslash.


Single-byte character differences

Windows-932 includes standard 7-bit
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
mappings for single-byte sequences with the high bit set to 0. Hence, codes 0x5C and 0x7E are mapped to Unicode as U+005C REVERSE SOLIDUS (\, the
backslash The backslash is a typographical mark used mainly in computing and mathematics. It is the mirror image of the common slash . It is a relatively recent mark, first documented in the 1930s. History , efforts to identify either the origin of ...
) and U+007E
TILDE The tilde () or , is a grapheme with several uses. The name of the character came into English from Spanish, which in turn came from the Latin '' titulus'', meaning "title" or "superscription". Its primary use is as a diacritic (accent) i ...
(~) respectively, as they are in ASCII ( ISO-646-US). This is likewise done by the W3C/WHATWG encoding standard. By contrast, 0x5C is mapped to U+00A5
YEN SIGN The yen and yuan sign, ¥, is a currency sign used for the Japanese yen and the Chinese yuan currencies when writing in Latin scripts. This monetary symbol resembles a Latin letter Y with a single or double horizontal stroke. The symbol is usua ...
(¥) in ISO-646-JP and consequently
JIS X 0201 JIS X 0201, a Japanese Industrial Standard developed in 1969 (then called JIS C 6220 until the JIS category reform), was the first Japanese electronic character set to become widely used. It is either a 7-bit encoding or an 8-bit encoding, altho ...
, of which standard
Shift JIS Shift JIS (Shift Japanese Industrial Standards, also SJIS, MIME name Shift_JIS, known as PCK in Solaris contexts) is a character encoding for the Japanese language, originally developed by a Japanese company called ASCII Corporation in conjuncti ...
is an extension. Correspondingly, Windows-31J avoids duplicate encoding of the backslash by mapping the double byte 0x815F to U+FF3C FULLWIDTH REVERSE SOLIDUS, whereas standard Shift JIS maps it to U+005C. However, 0x5C in Windows-932 is nonetheless considered a Yen sign in certain contexts. For this reason, in many Japanese fonts, U+005C is displayed as a Yen symbol, which would normally be represented as U+00A5, rather than as a backslash per Unicode's suggested rendering. U+00A5 is one-way best-fit mapped onto 0x5C in Windows-932. However, code 0x5C in Windows-932 behaves as a reverse solidus (backslash) in all respects (e.g. in file paths on Windows systems) other than how it is displayed by some fonts, and Microsoft's documentation for Windows-932 displays 0x5C as a backslash. This mapping corresponds to the encoding named "ibm-943_P15A-2003" in
International Components for Unicode International Components for Unicode (ICU) is an open-source project of mature C/ C++ and Java libraries for Unicode support, software internationalization, and software globalization. ICU is widely portable to many operating systems and environ ...
(ICU), except for minor reordering of a few
C0 control characters The C0 and C1 control code or control character sets define control codes for use in text by computer systems that use ASCII and derivatives of ASCII. The codes represent additional information about the text, such as the position of a cursor, ...
. IBM-943, like IBM-932, is a superset of the single-byte Code page 897, which maps 0x5C to the Yen symbol (¥) and 0x7E to the overline (), this is followed by the encoding named "ibm-943_P130-1999" in ICU. Code page 897 (and therefore also IBM-943 and IBM-932) also adds single-byte box-drawing characters replacing certain
C0 control characters The C0 and C1 control code or control character sets define control codes for use in text by computer systems that use ASCII and derivatives of ASCII. The codes represent additional information about the text, such as the position of a cursor, ...
, however these may still be treated as control characters depending on the context, and are mapped to control characters in ICU.


Layout


See also

* LMBCS-16


References


External links


Microsoft related


Microsoft's Reference for Windows Code Page 932Code page file for MS932 Mapping of Microsoft's Code Page 932 to UnicodeICU Code Page 943C (ibm-943_P15A-2003 alias windows-31j) demonstration


IBM related


ICU Code Page 943 (ibm-943_P130-1999) demonstrationICU mapping for ibm-943_P130-1999 to Unicode
{{character encoding
932 Year 932 ( CMXXXII) was a leap year starting on Sunday (link will display the full calendar) of the Julian calendar. Events By place Europe * Summer – Alberic II leads an uprising at Rome against his stepfather Hugh of Provence ...
Encodings of Japanese