Shift-JIS |
Shift_JIS (SJIS) is a sign at 0x5C and an overline at 0x7E in place of the ASCII character set s backslash and tilde respectively.
Shift_JIS requires an 8-bit medium for transmission. However, unlike the competing 8-bit format Extended Unix Coding (EUC), Shift_JIS only guarantees that the first byte will be in the upper ASCII range; the value of the second byte can be either high or low. This makes reliable Shift_JIS detection difficult.
For a double-byte JIS sequence j_1 j_2, the transformation to the corresponding Shift_JIS bytes s_1 s_2 is:
:33 le j_1 le 96 Rightarrow s_1 = frac{j_1 + 1}{2} + 112, :97 le j_1 le 126 Rightarrow s_1 = frac{j_1 + 1}{2} + 176, :j_1 mbox{ is odd } Rightarrow s_2 = j_2 + 31 + operatorname{trunc}left( frac{j_2}{96} ight) , :j_1 mbox{ is even } Rightarrow s_2 = j_2 + 126,
Many different versions of Shift_JIS exist. There are two areas for expansion: Firstly, JIS X 0208 does not fill the whole 94x94 space encoded for it in Shift_JIS, therefore there is room for more characters here -- these are really extensions to JIS X 0208 rather than to Shift_JIS itself. The most popular extension here is to the Windows-31J (otherwise known as Code page 932) encoding popularized by Microsoft. Secondly, Shift_JIS has more encoding space than is needed for JIS X 0201 and JIS X 0208 and these can and are used for yet more characters. The space with lead bytes 0xF5 to 0xF9 is used by Japanese mobile phone operators for pictographs for use in email, for example (KDDI goes further and defines hundreds more in the space with lead bytes 0xF3 and 0xF4).
Beyond even this there have been numerous minor variations made on Shift_JIS, with individual characters here and there altered. Most of these extensions and variants have no IANA registration, so there is much scope for confusion if the extensions are used. Microsoft Code Page 932 is registered separately from Shift_JIS.
IBM 943 has the same extensions as Code Page 932.
= See also =
=External links=
|
|