Jacode4e
view release on metacpan or search on metacpan
Revision history for this software.
2.13.6.23 2026-07-14 00:00:00
- add 'sjis' encoding, JISC Shift_JIS (JIS X 0201 and JIS X 0208 only,
CP932 extended characters are not converted, use 'cp932' for them)
with the eras 'sjis1978' (JIS C 6226-1978), 'sjis1983' (JIS X
0208-1983), 'sjis1990' (JIS X 0208-1990), 'sjis2000' (JIS X
0213:2000), and 'sjis2004' (JIS X 0213:2004). The year-less 'sjis'
is the 1990 era. The eras differ by the JIS C 6226-1978 versus JIS
X 0208-1983 exchanged/relocated codes, the two kanji appended by
JIS X 0208-1990 (U+51DC, U+7199), and the ten kanji appended by JIS
X 0213:2004.
- add 'euc' encoding, JISC EUC-JP (code set 0, 1, 2, and 3), with the
eras 'euc1978', 'euc1983', 'euc1990', 'euc2000', and 'euc2004' (the
year-less 'euc' is the 1990 era). 'euc' of each era is derived by
encoding conversion from the 'sjis' column of the same era via
men-ku-ten, so no new mapping data is added for code set 0, 1,
and 2
- support EUC-JP code set 3 (SS3 0x8F + JIS X 0212) input/output on
'euc1990' (and so the year-less 'euc') for every character that
has a row in the Jacode4e table through some OTHER encoding
(CP932X, CP932, CP932IBM, CP932NEC, CP00930, KEIS78/83/90, JEF,
JIPS(J)/(E), or LetsJ). A character whose ONLY repertoire
membership is JIS X 0212 (about half of the JIS X 0212 repertoire;
3108 of 6067 code points in the source table) has no row and
becomes GETA, because giving it one would require allocating a new
UTF-8-SPUA-JP code point and is out of scope for this release;
JIS X 0208 always wins over JIS X 0212 for a character that is in
both (matches how 'sjis'/'euc'/'jis' behave for era differences).
eras other than 1990 (1978, 1983, 2000, 2004) have no code set 3,
since JIS X 0212 was specifically a 1990-era JIS supplement
- the JIS X 0212 mapping is embedded as the "__EUC_X0212__" block
appended after the main table in lib/Jacode4e.pm's __DATA__
section (JIS X 0212 GL octets + Unicode code point per line,
derived from the JIS X 0212 (1990) to Unicode 1.1 Table already
bundled at make__DATA__/LetsJ/...JIS0212.TXT); regenerate it with
make__DATA__/JIS/fill_euc_codeset3.pl
- add 'jis' encoding, JISC ISO-2022-JP (7bit JIS), with the eras
'jis1978', 'jis1983', 'jis1990', 'jis2000', and 'jis2004' (the
year-less 'jis' is the 1990 era). 'jis' of each era shares the
'euc' table of the same era, so JIS X 0212 (ESC $ ( D) is
available on 'jis1990' for the same character set as EUC-JP code
set 3 of 'euc1990' (input is always accepted; output needs the
JIS_X0212 option, see below)
input escape sequences: ESC ( B, ESC ( J, ESC ( H, ESC ( I,
ESC $ @, ESC $ B, ESC $ ( @, ESC $ ( B, ESC $ ( D, and
ESC & @ ESC $ B
8bit JIS Katakana (GR octets 0xA1..0xDF) is also accepted on input
SO (0x0E) and SI (0x0F) are input shift functions to JIS X 0201
Katakana (JIS7 katakana habit) with option JIS_SOSI => 1, and are
data octets by default; SI restores the GL designation before SO
output uses ESC ( B and ESC $ B with option OUTPUT_SHIFTING => 1;
the DBCS designation on output is ESC $ @ for 'jis1978', ESC $ B
for 'jis1983'/'jis1990', ESC $ ( O for 'jis2000', and ESC $ ( Q
for 'jis2004'
- add option JIS_X0212 => 1: a character that has no JIS X 0208 code
but has a JIS X 0212 code is written as ESC $ ( D and JIS X 0212
codes on 'jis' output (ISO-2022-JP-1); requires OUTPUT_SHIFTING
=> 1 because escape sequences must be allowed in the output;
default is false, effective only when $OUTPUT_encoding is 'jis'
- add option JIS_KANA => 'GR' (default) / 'I' / 'SO': JIS X 0201
Katakana style on 'jis' output (GR octets, ESC ( I and GL octets,
or SO + GL octets + SI)
- add option JIS_DBCS => 'B' (default) / '@' / '&@B' / '(B' / '(@':
DBCS escape sequence on 'jis' output
- add option JIS_SBCS => 'B' (default) / 'J' / 'H': SBCS escape
sequence on 'jis' output
- add five columns "sjis1978", "sjis1983", "sjis1990", "sjis2000",
and "sjis2004" to the conversion table in __DATA__ (row count is
unchanged, all previously existing columns are unchanged), and
( run in 1.203 second using v1.01-cache-2.11-cpan-84de2e75c66 )