Use four kinds of Shift JIS properly in CotEditor on Mac

There are multiple variants of Japanese Shift JIS-based encodings. Choosing the appropriate one 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 variant. It supports JIS level 1 and 2 kanji characters.

Japanese (Shift JIS X0213)Shift_JIS

Supports the JIS X0213 character set, including JIS levels 1 through 4 kanji characters.

Japanese (Mac OS)x-mac-japanese

An extension of Shift JIS with Mac-specific characters, used in Mac OS 9 and earlier.

Japanese (Windows, DOS)cp932

An extension of Shift JIS with Windows-specific 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 handled 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