Shift-JIS
- The title given to this article is incorrect due to technical limitations. The correct title is Shift_JIS.
Shift_JIS (SJIS) is a character encoding for the Japanese language developed by Microsoft. As the name implies, it is based on the ISO-2022-JP (JIS) encoding, but with most byte values shifted to accommodate an additional 64 katakana characters in the range 0xA0 to 0xDF.
Unlike JIS, Shift_JIS requires an 8-bit medium for transmission. However, unlike competing 8-bit format 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 <math>j_1 j_2<math>, the transformation to the corresponding Shift_JIS bytes <math>s_1 s_2<math> is:
- <math>33 \le j_1 \le 96 \Rightarrow s_1 = \frac{j_1 + 1}{2} + 112<math>
- <math>97 \le j_1 \le 126 \Rightarrow s_1 = \frac{j_1 + 1}{2} + 176<math>
- <math>j_1 \mbox{ is odd } \Rightarrow s_2 = j_2 + 31 + \operatorname{trunc}\left( \frac{j_2}{95} \right) <math>
- <math>j_1 \mbox{ is even } \Rightarrow s_2 = j_2 + 126<math>
Shift_JIS retains a niche especially in Japanese web pages.
External link
- Ping: Japanese text encoding (http://lfw.org/text/jp.html)
ja:Shift_JIS fr:Shift-JIS