1 |
#?PESRC/1.0 |
2 |
Name: |
3 |
ISO2022::JISCompatible |
4 |
ShortDescription: |
5 |
An Encode module of ISO/IEC 2022 |
6 |
based compatible coding systems for Japanese |
7 |
POD:DESCRIPTION: |
8 |
Due to the historical reason, some of current |
9 |
implementions of JIS coded character sets support |
10 |
pairs of same characters dupplicately, with |
11 |
halfwidth/fullwidth property. |
12 |
|
13 |
Although this situation is undesirable, we can't ignore |
14 |
such historical implementions and latest JIS coded |
15 |
character set standards admire such dupulicate |
16 |
encoding to and only to "keep compatibility with |
17 |
current practice." |
18 |
|
19 |
This module provides encoder and decoder for such |
20 |
coding systems that comform to JIS and that based |
21 |
on ISO/IEC 2022 structure. |
22 |
|
23 |
Those coding systems SHOULD not be used for new |
24 |
implemention or new data. They may not comform |
25 |
to future version of JIS or other standards. |
26 |
|
27 |
{ |
28 |
Name: |
29 |
iso-2022-jp-fullwidth |
30 |
Encode: |
31 |
use:Encode::ISO2022::SevenBit |
32 |
=>ucs_to_ascii ucs_to_jisx0208_1998_irv ucs_to_jisx0208_1978_to_irv ucs_to_jisx0201_latin |
33 |
->iso-2022-jp |
34 |
Decode: |
35 |
use:Encode::ISO2022::SevenBit |
36 |
<-iso-2022-jp |
37 |
<=jisx0208_1983_irv_to_ucs jisx0208_1978_irv_to_ucs jisx0201_latin_to_ucs jisx0201_katakana_to_ucs jisx0212_1990_irv_to_ucs jisx0213_2000_1_irv_to_ucs jisx0213_2000_2_to_ucs jisx0208_1997_irv_to_ucs |
38 |
Description: |
39 |
ISO/IEC 2022 based 7-bit encoding for Japanese, |
40 |
ASCII + JIS X 0201 + JIS X 0208-1978 + JIS X 0208-1983. |
41 |
Some characters defined in JIS X 0208 are mapped to FULLWIDTH |
42 |
area of UCS as specified in JIS X 0208:1997. |
43 |
|
44 |
This encoding is a "compatible" version of |
45 |
C<iso-2022-jp> defined in Encode::ISO2022::SevenBit. |
46 |
|
47 |
When decoding, mapping tables from coded character |
48 |
sets listed below to UCS are also loaded to restore |
49 |
incorrectly labeled data. |
50 |
|
51 |
JIS X 0201 Katakana coded character set, |
52 |
JIS X 0212-1990, JIS X 0213:2000 |
53 |
|
54 |
Note that for Windows user, Encode::ISO2022::CP932 |
55 |
may be useful to try to restore broken "ISO-2022-JP" |
56 |
data. |
57 |
} |
58 |
|
59 |
{ |
60 |
Name: |
61 |
iso-2022-jp-3-fullwidth |
62 |
Encode: |
63 |
use:Encode::ISO2022::SevenBit |
64 |
=>ucs_to_ascii ucs_to_jisx0213_2000_1_irv ucs_to_jisx0213_2000_2 |
65 |
->iso-2022-jp-3 |
66 |
Decode: |
67 |
use:Encode::ISO2022::SevenBit |
68 |
<-iso-2022-jp-3 |
69 |
<=jisx0213_2000_1_irv_to_ucs jisx0213_2000_2_to_ucs jisx0208_1997_irv_to_ucs |
70 |
Description: |
71 |
ISO/IEC 2022 based 7-bit encoding for Japanese, |
72 |
ISO/IEC 646 IRV + JIS X 0213:2000. Some characters |
73 |
defined in JIS X 0213 are mapped to FULLWIDTH |
74 |
area of UCS as specified in JIS X 0213:2000. |
75 |
|
76 |
This encoding is a "compatible" version of |
77 |
C<iso-2022-jp-3> defined in Encode::ISO2022::SevenBit. |
78 |
} |
79 |
|
80 |
{ |
81 |
Name: |
82 |
euc-jp-1997-fullwidth |
83 |
Alias: |
84 |
euc-japan-1997-fullwidth euc-jp-1990-fullwidth euc-japan-1990-fullwidth |
85 |
Encode: |
86 |
=>ucs_to_ascii ucs_to_jisx0208_1997_irv ucs_to_jisx0212_1990_irv ucs_to_jisx0201_katakana_hw |
87 |
->euc-jp-1997 |
88 |
Decode: |
89 |
<-euc-jp-1997 |
90 |
<=jisx0208_1997_irv_to_ucs jisx0212_1990_irv_to_ucs jisx0201_katakana_hw_to_ucs |
91 |
Description: |
92 |
EUC (ISO/IEC 2022 based 8-bit encoding) for Japanese, |
93 |
ISO/IEC 646 IRV + JIS X 0208:1997 + JIS X 0212-1990 |
94 |
+ JIS X 0201:1997 Katakana. Some characters defined |
95 |
in JIS X 0208 and all characters defined in JIS X 0201 |
96 |
are mapped to FULLWIDTH or HALFWIDTH characters of UCS |
97 |
as specified by JIS X 0221-1995 and JIS X 0208:1997. |
98 |
|
99 |
This encoding is a "compatible" version of |
100 |
C<euc-jp-1997> defined in Encode::ISO2022::EightBit. |
101 |
} |
102 |
|
103 |
{ |
104 |
Name: |
105 |
euc-jisx0213-fullwidth |
106 |
Alias: |
107 |
euc-japan-2000-fullwidth euc-jp-2000-fullwidth |
108 |
Encode: |
109 |
use:Encode::ISO2022::EightBit |
110 |
=>ucs_to_ascii ucs_to_jisx0213_2000_1_irv ucs_to_jisx0213_2000_2 ucs_to_jisx0201_katakana_hw |
111 |
->euc-jisx0213 |
112 |
Decode: |
113 |
use:Encode::ISO2022::EightBit |
114 |
<-euc-jisx0213 |
115 |
<=jisx0213_2000_1_irv_to_ucs jisx0213_2000_2_to_ucs jisx0201_katakana_hw_to_ucs |
116 |
Description: |
117 |
EUC (ISO/IEC 2022 based 8-bit encoding) for Japanese, |
118 |
ISO/IEC 646 IRV + JIS X 0213:2000 + JIS X 0201:1997 |
119 |
Katakana. Some characters defined in JIS X 0213 and |
120 |
all characters defined in JIS X 0201 are mapped to |
121 |
FULLWIDTH or HALFWIDTH characters of UCS as specified |
122 |
by JIS X 0213:2000. |
123 |
|
124 |
This encoding is a "compatible" version of |
125 |
C<euc-jisx0213> defined in Encode::ISO2022::EightBit. |
126 |
} |
127 |
|
128 |
POD:EXAMPLE: |
129 |
use %%MYSELF%%; |
130 |
while (<>) { |
131 |
print "FW-> : ". Encode::encode ('euc-jp-1997', Encode::decode ('euc-jp-1997-fullwidth', $_)); |
132 |
print "FW->FW: ". Encode::encode ('euc-jp-1997-fullwidth', Encode::decode ('euc-jp-1997-fullwidth', $_)); |
133 |
print " ->FW: ". Encode::encode ('euc-jp-1997-fullwidth', Encode::decode ('euc-jp-1997', $_)); |
134 |
print " -> : ". Encode::encode ('euc-jp-1997', Encode::decode ('euc-jp-1997', $_)); |
135 |
} |
136 |
} |
137 |
|
138 |
POD:SEE ALSO: |
139 |
%%ReferenceJISX0212_1995%% |
140 |
|
141 |
%%ReferenceJISX0208_1997%% |
142 |
|
143 |
%%ReferenceJISX0213_2000%% |
144 |
|
145 |
%%ReferenceRFC1468%% |
146 |
|
147 |
L<Encode::ISO2022::EightBit> |
148 |
|
149 |
POD:LICENSE: |
150 |
Copyright %%YEAR%% Wakaba <w@suika.fam.cx> |
151 |
|
152 |
%%PerlLicense%% |