iso2022jp(5)iso2022jp(5)NAME
iso2022jp, iso-2022-jp, ISO-2022-JP - A character encoding system
(codeset) for Japanese
DESCRIPTION
The ISO-2022-JP codeset consists of the following character sets: ASCII
For information on the ASCII character set, refer to ascii(5).
JIS X0201-1976
Only the Roman letters in this character set are included. For
details, refer to deckanji(5). JIS X0208-1978 JIS X0208-1983
JIS X0208-1983 is a revised version of JIS X0208-1978 and
remapped some characters of JIS X0208-1978 to other positions.
Before a character is used, its corresponding character set must be
designated. In ISO-2022-JP, the designation of a character set is done
by using an escape sequence as follows:
──────────────────────────────────────────────────────────────
Escape Sequence Character Set
──────────────────────────────────────────────────────────────
ESC ( B ACSII
ESC ( J JIS X0201-1976 (left-hand part)
ESC $ @ JIS X0208-1978
ESC $ ( 0 User-defined characters (This range of
characters is proprietary to HP.)
ESC $ B JIS X0208-1983
──────────────────────────────────────────────────────────────
It is assumed that the starting code of a line is ASCII (including CR
alone and LF alone, but not including the combination CRLF). If there
are JIS X0208 characters on a line, there must be a switch to ASCII or
to the left-hand part of JIS X0201 (Roman letters) before the end of
the line (in other words, before the CRLF, or carriage return and line
feed).
For example, if a line starts with the ASCII character 9, followed by
the JIS X0208-1978 character at row 16 column 1, the line is encoded as
follows:
39h ESC $ @ 30h 21h .... ESC ( B .... CRLF
If a line starts with the JIS X0208-1978 character at row 16 column 1,
followed by the ASCII character 9, then the line is encoded as follows:
ESC $ @ 30h 21h ESC ( B 39h .... CRLF
Once a character set is designated, there is no need to redesignate the
character set if the adjacent character belongs to the same character
set. For example, the following practice is not recommended:
ESC $ B .... ESC $ B ....
Currently, the operating system supports the ISO 2022-JP codeset only
through codeset converters; there is no direct support through locales
or fonts. For your options in printing and displaying Japanese charac‐
ters, refer to i18n_printing(5) and Japanese(5).
Codeset Conversion
The following codeset converter pairs are available for converting Ja‐
panese characters between ISO-2022-JP and other encoding formats. In
converter names, the string ISO-2022-JP indicates that user-defined
characters are not included in the conversion while the string
ISO-2022-JPext indicates that user-defined characters are included in
the conversion. Refer to iconv_intro(5) for an introduction to codeset
conversion. For more information about the other codeset for which
ISO-2022-JP or ISO-2022-JPext is the input or output, see the reference
page specified in the list item. deckanji_ISO-2022-JP or deck‐
anji_ISO-2022-JPext, ISO-2022-JP_deckanji or ISO-2022-JPext_deckanji
Converting from and to the DEC Kanji codeset: deckanji(5).
eucJP_ISO-2022-JP or eucJP_ISO-2022-JPext, ISO-2022-JP_eucJP or
ISO-2022-JPext_eucJP
Converting from and to Japanese Extended UNIX Code: eucJP(5).
sdeckanji_ISO-2022-JP or sdeckanji_ISO-2022-JPext,
ISO-2022-JP_sdeckanji or ISO-2022-JPext_sdeckanji
Converting from and to the Super DEC Kanji codeset: sdeck‐
anji(5). SJIS_ISO-2022-JP or SJIS_ISO-2022-JPext,
ISO-2022-JP_SJIS or ISO-2022-JPext_SJIS
Converting from and to the Shift JIS codeset: SJIS(5).
Note that SJIS encoding is equivalent to the Microsoft code-page
format used on PC systems. Therefore, you can use these convert‐
ers to convert Japanese characters between the ISO 2022-JP and
PC code-page formats. See code_page(5) for information on how
the operating system supports PC code pages. UTF-8_ISO-2022-JP
or UTF-8_ISO-2022-JPext, ISO-2022-JP_UTF-8 or
ISO-2022-JPext_UTF-8
Converting from and to the UTF-8 codeset: Unicode(5).
SEE ALSO
Commands: locale(1)
Others: ascii(5), code_page(5), deckanji(5), eucJP(5), i18n_intro(5),
i18n_printing(5), iconv_intro(5), iso2022(5), Japanese(5), jiskanji(5),
l10n_intro(5), sdeckanji(5), shiftjis(5)iso2022jp(5)