| |||||||||
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:
Shift-JIS retains a niche especially in Japanese web pages, but ISO-2022-JP and Unicode (particularly in its UTF-8 representation) are generally preferable.