Use four kinds of Shift JIS properly in CotEditor on Mac

There are multiple variants of the Japanese Shift JIS encoding. Using the appropriate variant helps prevent unintended character corruption.

CotEditor distinguishes among the following four Shift JIS–based encodings.

Encoding nameIANA charset nameDescription
Japanese (Shift JIS)shift_jis

The most basic Shift JIS supporting JIS level 1 and 2 kanji characters.

Japanese (Shift JIS X0213)Shift_JIS

Support JIS X0213 character set, which includes JIS level 1 through 4 kanji characters.

Japanese (Mac OS)(x-mac-japanese)

Based on Shift JIS, with extended support for such as Mac-dependent characters. Being used in Mac OS 9 and earlier.

Japanese (Windows, DOS)cp932

Based on Shift JIS, with extended support for such as Windows-dependent characters.

These encoding names follow the terminology used in standard macOS. Although “Japanese (Mac OS)” and “Japanese (Windows, DOS)” don’t include the term Shift JIS in their names, both are extended versions of Shift JIS.

The appropriate encoding varies depending on the situation, but in general “Japanese (Shift JIS)” is the safest choice.

Handling of certain characters in Shift JIS–based encodings

Even within the same Shift JIS family, some characters are treated differently, as shown in the table below:

Halfwidth Yen sign (¥)Halfwidth backslash (\)Halfwidth tilde (~)
Shift JISAvailableReplaced with fullwidth backslash (\)Replaced with question mark (?)
Shift JIS X0213AvailableReplaced with fullwidth backslash (\)Replaced with fullwidth tilde (〜)
Mac OSAvailableAvailableAvailable
Windows, DOSReplaced with backslash (\)AvailableAvailable

When using these characters in a document, be aware of differences among text encodings.

To check whether any incompatible characters are included in the document, see Find characters incompatible with the document encoding.

See also