Or do these two characters simply not exist in Shift_JIS?
The first 128 characters in the Shift_JIS character encoding scheme match ASCII except for two: 0x5C is a Yen symbol (¥
) instead of a backslash, and 0x7E is an overline (‾
) instead of a tilde.
While there's plenty of clear information about how ¥
and ‾
takeover for \
and ~
, I haven't been able to find any clear statement about whether \
and ~
simply don't exist in Shift_JIS, or if there are alternate (probably multi-byte) encodings to handle these two displaced ASCII characters.
When I try to encode \
or ~
using node-iconv, it throws an error.
iconv-lite encodes both ¥
and \
as 0x5C, and both ‾
and ~
as 0x7E. When decoding, iconv-lite currently (and unfortunately) decodes 0x5C as \
and 0x7E as ~
, pending response to a bug report: