• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..07-May-2022-

blib/H03-May-2022-276102

lib/Encode/JIS2K/H05-Jun-2015-12489

t/H07-May-2022-1,1191,094

ucm/H05-Jun-2015-40,13740,133

ChangesH A D05-Jun-2015701 2219

JIS2K.cH A D03-May-20225.9 KiB224153

JIS2K.pmH A D05-Jun-20154.9 KiB15213

JIS2K.xsH A D03-May-2022705 3734

MANIFESTH A D05-Jun-2015673 2423

META.jsonH A D05-Jun-2015832 4241

META.ymlH A D05-Jun-2015452 2322

MYMETA.jsonH A D03-May-2022926 4342

MYMETA.ymlH A D03-May-2022550 2423

MakefileH A D03-May-202236.4 KiB1,117765

Makefile.PLH A D05-Jun-20154.6 KiB184156

READMEH A D30-Apr-20025 KiB13299

euc2k_t.cH A D03-May-20221.1 MiB23,60523,594

euc2k_t.exhH A D03-May-2022227 87

euc2k_t.fnmH A D03-May-202217 21

euc2k_t.hH A D03-May-2022216 81

raw_t.cH A D03-May-2022828.8 KiB19,47719,464

raw_t.exhH A D03-May-2022275 98

raw_t.fnmH A D03-May-202232 32

raw_t.hH A D03-May-2022253 92

sjis2k_t.cH A D03-May-2022689.8 KiB14,95214,941

sjis2k_t.exhH A D03-May-2022230 87

sjis2k_t.fnmH A D03-May-202216 21

sjis2k_t.hH A D03-May-2022219 81

README

1NAME
2       Encode::JIS2K - JIS X 0212 (aka JIS 2000) Encodings
3
4INSTALLATION
5
6To install this module type the following:
7
8   perl Makefile.PL
9   make
10   make test
11   make install
12
13SYNOPSIS
14         use Encode::JIS2K;
15         use Encode qw/encode decode/;
16         $euc_2k = encode("euc-jisx0213", $utf8);
17         $utf8   = decode("euc-jisx0213", $euc_jp);
18
19ABSTRACT
20       This module implements encodings that covers JIS X 0213
21       charset (AKA JIS 2000, hence the module name).  Encodings
22       supported are as follows.
23
24         Canonical     Alias                                      Description
25         --------------------------------------------------------------------
26         euc-jisx0213  qr/\beuc.*jp[ \-]?(?:2000|2k)$/i          EUC-JISX0213
27                       qr/\bjp.*euc[ \-]?(2000|2k)$/i
28                       qr/\bujis[ \-]?(?:2000|2k)$/i
29         shiftjisx0123 qr/\bshift.*jis(?:2000|2k)$/i           Shift_JISX0213
30                       qr/\bsjisp \-]?(?:2000|2k)$/i
31
32         iso-2022-jp-3
33         jis0213-1-raw                         JIS X 0213 plane 1, raw format
34         jis0213-2-raw                         JIS X 0213 plane 2, raw format
35         --------------------------------------------------------------------
36
37DESCRIPTION
38       To find out how to use this module in detail, see the
39       Encode manpage.
40
41what is JIS X 0213 anyway?
42       Simply put, JIS X 0213 is a rework and reorganization of
43       JIS X 0208 and JIS X 0212.  They consist of two 94x94
44       planes which roughly corrensponds as follows;
45
46         JIS X 0213 Plane 1 = JIS X 0208 + extension
47         JIS X 0213 Plane 2 = JIS X 0212 reorganized + extension
48
49       And here is the character repertoire there of at a glance.
50
51                 # of codepoints     Kuten Ku (rows) used
52         --------------------------------------------------------
53         JIS X 0208         6,879    1..8,16..83
54         JIS X 0213-1       8,762    1..94 (all!)
55         JIS X 0212         6,067    2,6..7,9..11,16..77
56         JIS X 0213-2       2,436    1,3..5,8,12..15,78..94
57         -------------------------------------------------------
58         (JIS X0213 Total) 11,197
59
60       JIS X 0213 was designed to extend JIS X 0208 and JIS X
61       0212 without being imcompatible to (classic) EUC-JP and
62       Shift_JIS.  The following characteristics are as a result
63       thereof.
64
65       o JIS X plane 1 is (almost) a superset of JIS X 0208.
66         However, with Unicode 3.2.0 the mappings differ in 3
67         codepoints.
68
69           Kuten   JIS X 0208 -> Unicode         JIS X 0213 -> Unicode
70           --------------------------------------------------------------
71           1-1-17  <UFFE3> # FULLWIDTH MACRON    <U203E> # OVERLINE
72           1-1-29  <U2014> # EM DASH             <U2015> # HORIZONTAL BAR
73           1-1-79  <UFFE5> # FULLWIDTH YEN SIGN  <U00A5> # YEN SIGN
74
75       o By the same token, JIS X 0213 plane 2 contains JIS Dai-4
76         Suijun Kanji (JIS Kanji Repertoire Level 4).  This
77         allows EUC-JP's G3 to contain both JIS X 0212 and JIS
78         0213 plane 2.
79
80         However, JIS X 0212:1990 already contains many of Dai-4
81         Suijun Kanji so EUC's G3 is subject to containing dupli-
82         cate mappings.
83
84       o Because of Halfwidth Katakana, Shift_JIS mapping has
85         been tricky and it is even trickier.  Here is a regex
86         that matches Shift_JISX0213 sequence (note: you have to
87         "use bytes" to make it work!)
88
89           $re_valid_shifjisx0213 =
90             qr/^(?:
91                  [\x00-\x7f] |                            # ASCII or
92                  [\xa1-\xdf] |                            # JIS X 0201 KANA or
93                  [\x81-\x9f\xe0-\xfc][\x40-\x7e\x80-\xfc] # JIS X 0213
94                  )+$/xo;
95
96       Note on EUC-JISX0213 (vs. EUC-JP)
97
98       As of Encode-1.64, 'euc-jp' does support euc-jisx0213 for
99       decoding.  However, 'euc-jp' in Encode and 'euc-jisx0213'
100       differ as follows;
101
102                           euc-jp                   euc-jisx0213
103         --------------------------------------------------------------
104         Decodes....       (0201-K|0208|0212|0213)  ditto
105         Round-Trip  (|0)  (020-K|0208|0212)        JIS X (0201-K|0213)
106         Decode Only (|3)  those only found in 0213
107                                               those only found in 0212
108         --------------------------------------------------------------
109
110AUTHORS
111       Dan Kogai <dankogai@dan.co.jp>
112
113COPYRIGHT
114       Copyright 2002 by Dan Kogai <dankogai@dan.co.jp>.
115
116       This program is free software; you can redistribute it
117       and/or modify it under the same terms as Perl itself.
118
119       See http://www.perl.com/perl/misc/Artistic.html
120
121SEE ALSO
122       the Encode manpage, the Encode::JP manpage
123
124       Japanese Graphic Character Set for Information Interchange
125       -- Plane 1 http://www.itscj.ipsj.or.jp/ISO-IR/228.pdf
126
127       Japanese Graphic Character Set for Information Interchange
128       -- Plane 2 http://www.itscj.ipsj.or.jp/ISO-IR/229.pdf
129
130
131
132