JIS encoding

Last updated

In computing, JIS encoding refers to several Japanese Industrial Standards for encoding the Japanese language. [1] Strictly speaking, the term means either:

Contents

In practice, "JIS encoding" usually refers to JIS X 0208 character data encoded with JIS X 0202. For instance, the IANA uses the JIS_Encoding label to refer to JIS X 0202, and the ISO-2022-JP label to refer to the profile thereof defined by RFC   1468. [2]

Other encoding mechanisms for JIS characters include the Shift JIS encoding and EUC-JP. Shift JIS adds the kanji, full-width hiragana and full-width katakana from JIS X 0208 to JIS X 0201 in a backward compatible way. [3] Shift JIS is perhaps the most widely used encoding in Japan, as the compatibility with the single-byte JIS X 0201 character set made it possible for electronic equipment manufacturers (such as cash register manufacturers) to offer an upgrade from older cheaper equipment that was not capable of displaying kanji to newer equipment while retaining character-set compatibility.

EUC-JP is used on UNIX systems, where the JIS encodings are incompatible with POSIX standards.

A more recent alternative to JIS coded characters is Unicode (UCS coded characters), particularly in the UTF-8 encoding mechanism.

Encoding comparison

The following table compares the features of the three main encoding schemes for JIS X 0208.

EncodingAlternate name7-bit? [lower-alpha 1] ISO 2022?State­less? [lower-alpha 2] Accepts ASCII?0x007F always ASCII?Superset of 8-bit JIS X 0201 ?Supports JIS X 0212 ?Bytewise self-synchron­izing?Bitwise self-synchron­izing?
ISO-2022-JP "JIS" (JIS X 0202)YesYesNo [lower-alpha 3] YesSequences can be non-ASCII [lower-alpha 3] No (encoding possible) [lower-alpha 4] Possible [lower-alpha 5] NoNo
Shift_JIS "SJIS"NoNoYesAlmost [lower-alpha 6] Isolated bytes can be non-ASCII [lower-alpha 7] YesNoNoNo
EUC-JP "UJIS" (Unixized JIS)NoYes [lower-alpha 8] Yes [lower-alpha 8] Usually [lower-alpha 9] YesNo (encoded) [lower-alpha 10] Usually available [lower-alpha 11] NoNo
Unicode formats for comparison [lower-alpha 12]
UTF-8  NoNoYesYesYesNo (encoded)AvailableYesUsually [lower-alpha 13]
UTF-16 "Unicode" [lower-alpha 14] NoNoYesNoNoNo (encoded)AvailableOver 16-bit words only.No
GB 18030  NoNo [lower-alpha 15] YesYesIsolated bytes can be non-ASCIINo (encoded)AvailableNoNo
UTF-32  NoNoYesNoNoNo (encoded)AvailableUsually, in practice [lower-alpha 16] No
  1. i.e. does not require 8-bit clean transmission.
  2. i.e. the sequence used to encode a given character is always the same, no matter what the previous character(s) were. See state (computer science).
  3. 1 2 ISO-2022-JP is a stateful encoding: all charsets are encoded over 0x217E and are switched between using ANSI escapes. Hence, while it is ASCII in its initial state, entire sequences of non-ASCII characters can be encoded with ASCII bytes.
  4. JIS X 0201 katakana are available in JIS X 0202 and ISO 2022, but not included in the basic ISO-2022-JP profile, although they are a common extension.
  5. JIS X 0212 is available in JIS X 0202 and ISO 2022, and included in the ISO-2022-JP-1 and ISO-2022-JP-2 profiles, but not in the basic ISO-2022-JP profile.
  6. Single byte characters 0x217E in Shift_JIS are properly ISO-646-JP, in order to be a superset of 8-bit JIS X 0201, but are often decoded (not necessarily displayed) as ASCII, which differs only in two places.
  7. Some (not all) ASCII bytes can appear as second bytes, but not first bytes, of double-byte characters in Shift_JIS. Hence in a sequence of two or more ASCII bytes, the second byte onward are necessarily ASCII (or ISO-646-JP) characters.
  8. 1 2 Packed-format EUC is based on ISO 2022 mechanisms, with charset designations pre-arranged. Charset designation escapes and locking shifts are avoided, whereas use of single shifts can be implemented in a non-stateful manner. The constraints of ISO 2022 are nonetheless followed.
  9. Single byte characters 0x217E in EUC-JP are generally considered ASCII, but sometimes treated as ISO-646-JP.
  10. Unlike Shift_JIS, EUC-JP will not handle plain 8-bit JIS X 0201 input without prior conversion, due to the different representation of the JIS X 0201 katakana (with single-shifts).
  11. JIS X 0212 in EUC-JP is not always implemented.
  12. Besides the properties of the encodings themselves, Unicode formats have further advantages stemming from the underlying character set: they are not limited to JIS coded characters but can represent the entirety of UCS (including the full repertoire of JIS coded characters), and are hence suited to international use. They are also less badly affected by colliding proprietary extensions, due to their greater base repertoire and designated private use areas.
  13. Most bitwise frameshifts of UTF-8-encoded text will produce invalid UTF-8, but it is possible to construct sequences of characters that remain valid UTF-8 even when frameshifted by one or more bits.
  14. By Microsoft only.
  15. While GB 18030 and GBK are extensions of the EUC-CN form of GB/T 2312, they do not follow the constraints of EUC or ISO 2022, unlike EUC-JP (or the original EUC-CN).
  16. Although, in theory, UTF-32 is self-synchronizing over 32-bit dwords only, the use of a 32-bit value to represent a 21-bit value means that, in practice, UTF-32 contains a continuous run of at least 11 zero bits at the high end of each character, which can usually be used to align to character boundaries, depending on the codepoint(s) involved.

See also

Related Research Articles

<span class="mw-page-title-main">Character encoding</span> Using numbers to represent text characters

Character encoding is the process of assigning numbers to graphical characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using digital computers. The numerical values that make up a character encoding are known as "code points" and collectively comprise a "code space", a "code page", or a "character map".

While Hypertext Markup Language (HTML) has been in use since 1991, HTML 4.0 from December 1997 was the first standardized version where international characters were given reasonably complete treatment. When an HTML document includes special characters outside the range of seven-bit ASCII, two goals are worth considering: the information's integrity, and universal browser display.

<span class="mw-page-title-main">Japanese language and computers</span>

In relation to the Japanese language and computers many adaptation issues arise, some unique to Japanese and others common to languages which have a very large number of characters. The number of characters needed in order to write in English is quite small, and thus it is possible to use only one byte (28=256 possible values) to encode each English character. However, the number of characters in Japanese is many more than 256 and thus cannot be encoded using a single byte - Japanese is thus encoded using two or more bytes, in a so-called "double byte" or "multi-byte" encoding. Problems that arise relate to transliteration and romanization, character encoding, and input of Japanese text.

ISO/IEC 2022Information technology—Character code structure and extension techniques, is an ISO/IEC standard in the field of character encoding. It is equivalent to the ECMA standard ECMA-35, the ANSI standard ANSI X3.41 and the Japanese Industrial Standard JIS X 0202. Originating in 1971, it was most recently revised in 1994.

Shift JIS is a character encoding for the Japanese language, originally developed by a Japanese company called ASCII Corporation in conjunction with Microsoft and standardized as JIS X 0208 Appendix 1.

Extended Unix Code (EUC) is a multibyte character encoding system used primarily for Japanese, Korean, and simplified Chinese (characters).

GB/T 2312-1980 is a key official character set of the People's Republic of China, used for Simplified Chinese characters. GB2312 is the registered internet name for EUC-CN, which is its usual encoded form. GB refers to the Guobiao standards (国家标准), whereas the T suffix denotes a non-mandatory standard.

<span class="mw-page-title-main">Shift Out and Shift In characters</span> ASCII control characters

Shift Out (SO) and Shift In (SI) are ASCII control characters 14 and 15, respectively. These are sometimes also called "Control-N" and "Control-O".

A variable-width encoding is a type of character encoding scheme in which codes of differing lengths are used to encode a character set for representation, usually in a computer. Most common variable-width encodings are multibyte encodings, which use varying numbers of bytes (octets) to encode different characters. (Some authors, notably in Microsoft documentation, use the term multibyte character set, which is a misnomer, because representation size is an attribute of the encoding, not of the character set.)

<span class="mw-page-title-main">JIS X 0201</span> Japanese single byte character encoding

JIS X 0201, a Japanese Industrial Standard developed in 1969, was the first Japanese electronic character set to become widely used. The character set was initially known as JIS C 6220 before the JIS category reform. Its two forms were a 7-bit encoding or an 8-bit encoding, although the 8-bit form was dominant until Unicode replaced it. The full name of this standard is 7-bit and 8-bit coded character sets for information interchange (7ビット及び8ビットの情報交換用符号化文字集合).

Half-width kana are katakana characters displayed compressed at half their normal width, instead of the usual square (1:1) aspect ratio. For example, the usual (full-width) form of the katakana ka is カ while the half-width form is カ. Half-width hiragana is not included in Unicode, although it is usable on Web or in e-books via CSS's font-feature-settings: "hwid" 1 with Adobe-Japan1-6 based OpenType fonts. Half-width kanji is not usable on modern computers, but is used in some receipt printers, electric bulletin board and old computers.

<span class="mw-page-title-main">JIS X 0213</span> Japanese standard character set

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 adding a number of special characters, characters with diacritic marks, etc., it included an additional 3,625 kanji. The full name of the standard is 7-bit and 8-bit double byte coded extended KANJI sets for information interchange.

JIS X 0212 is a Japanese Industrial Standard defining a coded character set for encoding supplementary characters for use in Japanese. This standard is intended to supplement JIS X 0208. It is numbered 953 or 5049 as an IBM code page.

JIS X 0208 is a 2-byte character set specified as a Japanese Industrial Standard, containing 6879 graphic characters suitable for writing text, place names, personal names, and so forth in the Japanese language. The official title of the current standard is 7-bit and 8-bit double byte coded KANJI sets for information interchange. It was originally established as JIS C 6226 in 1978, and has been revised in 1983, 1990, and 1997. It is also called Code page 952 by IBM. The 1978 version is also called Code page 955 by IBM.

Code page 895 is a 7-bit character set and is Japan's national ISO 646 variant. It is the Roman set of the JIS X 0201 Japanese Standard and is variously called Japan 7-Bit Latin, JISCII, JIS Roman, JIS C6220-1969-ro, ISO646-JP or Japanese-Roman. Its ISO-IR registration number is 14.

Microsoft Windows code page 932, also called Windows-31J amongst other names, 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.

Code page 942 is one of IBM's extensions of Shift JIS. The coded character sets are JIS X 0201, JIS X 0208, IBM extensions for IBM 1880 UDC and IBM extensions. It is the combination of the single-byte Code page 1041 and the double-byte Code page 301.

<span class="mw-page-title-main">ARIB STD B24 character set</span> Character encoding and character set extensions used in Japanese broadcasting.

Volume 1 of the Association of Radio Industries and Businesses (ARIB) STD-B24 standard for Broadcast Markup Language specifies, amongst other details, a character encoding for use in Japanese-language broadcasting. It was introduced on 1999-10-26. The latest revision is version 6.3 as of 2016-07-06.

Code page 896, called Japan 7-Bit Katakana Extended, is IBM's code page for code-set G2 of EUC-JP, a 7-bit code page representing the Kana set of JIS X 0201 and accompanying Code page 895 which corresponds to the lower half of that standard. It encodes half-width katakana.

Several mutually incompatible versions of the Extended Binary Coded Decimal Interchange Code (EBCDIC) have been used to represent the Japanese language on computers, including variants defined by Hitachi, Fujitsu, IBM and others. Some are variable-width encodings, employing locking shift codes to switch between single-byte and double-byte modes. Unlike other EBCDIC locales, the lowercase basic Latin letters are often not preserved in their usual locations.

References

  1. Haralambous, Yannis (2007). Fonts & Encodings. O'Reilly Media. pp. 42–44. ISBN   9780596102425.
  2. "Character Sets". IANA.
  3. Lunde, Ken (2009). CJKV Information Processing. O'Reilly Media. pp. 262–268. ISBN   9780596514471.