1 |
wakaba |
1.1 |
=head1 NAME |
2 |
|
|
|
3 |
|
|
Encode::ISO2022::RFC1345 --- Encode and decode of ISO/IEC 2022 |
4 |
|
|
based encodings described in IETF RFC 1345 (and not defined by |
5 |
wakaba |
1.3 |
any other standards) |
6 |
wakaba |
1.1 |
|
7 |
|
|
=head1 ENCODINGS |
8 |
|
|
|
9 |
|
|
=over 4 |
10 |
|
|
|
11 |
|
|
=cut |
12 |
|
|
|
13 |
|
|
require 5.7.3; |
14 |
|
|
use strict; |
15 |
|
|
package Encode::ISO2022::RFC1345; |
16 |
|
|
use vars qw($VERSION); |
17 |
wakaba |
1.3 |
$VERSION=do{my @r=(q$Revision: 1.2 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
18 |
wakaba |
1.1 |
use base qw(Encode::Encoding); |
19 |
|
|
require Encode::ISO2022; |
20 |
|
|
|
21 |
|
|
sub encode ($$;$) { |
22 |
|
|
my ($obj, $str, $chk) = @_; |
23 |
|
|
$_[1] = '' if $chk; |
24 |
|
|
$str = &Encode::ISO2022::internal_to_iso2022 ($str, $obj->__2022_encode); |
25 |
|
|
return $str; |
26 |
|
|
} |
27 |
|
|
|
28 |
|
|
sub decode ($$;$) { |
29 |
|
|
my ($obj, $str, $chk) = @_; |
30 |
|
|
$_[1] = '' if $chk; |
31 |
|
|
return &Encode::ISO2022::iso2022_to_internal ($str, $obj->__2022_decode); |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
sub __2022__common ($) { |
35 |
|
|
my $C = Encode::ISO2022->new_object; |
36 |
|
|
$C->{option}->{designate_to}->{C0}->{default} = -1; |
37 |
|
|
$C->{option}->{designate_to}->{C1}->{default} = -1; |
38 |
|
|
$C->{option}->{designate_to}->{G94}->{default} = -1; |
39 |
|
|
$C->{option}->{designate_to}->{G94}->{B} = -1; |
40 |
|
|
$C->{option}->{designate_to}->{G94n}->{default} = -1; |
41 |
|
|
$C->{option}->{designate_to}->{G96}->{default} = -1; |
42 |
|
|
$C->{option}->{designate_to}->{G96n}->{default} = -1; |
43 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G94}->{"\x7E"}; ## empty |
44 |
|
|
$C->{option}->{reset}->{Gdesignation} = 0; |
45 |
|
|
$C->{option}->{reset}->{Ginvoke} = 0; |
46 |
|
|
$C; |
47 |
|
|
} |
48 |
|
|
sub __2022_encode ($) { |
49 |
|
|
my $C = shift->__2022__common; |
50 |
|
|
$C->{GR} = undef; |
51 |
|
|
$C; |
52 |
|
|
} |
53 |
|
|
sub __2022_decode ($) { |
54 |
|
|
my $C = shift->__2022__common; |
55 |
|
|
$C; |
56 |
|
|
} |
57 |
|
|
|
58 |
|
|
package Encode::ISO2022::RFC1345::NATSSEFI; |
59 |
|
|
use vars qw/@ISA/; |
60 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
61 |
|
|
__PACKAGE__->Define (qw/NATS-SEFI iso-ir-8-1 csNATSSEFI/); |
62 |
|
|
|
63 |
|
|
=item NATS-SEFI |
64 |
|
|
|
65 |
|
|
NATS-SEFI (Alias: iso-ir-8-1, csNATSSEFI (IANA)) |
66 |
|
|
|
67 |
|
|
=cut |
68 |
|
|
|
69 |
|
|
sub __2022__common ($) { |
70 |
|
|
my $C = shift->SUPER::__2022__common; |
71 |
|
|
$C->{bit} = 7; |
72 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x43"}; |
73 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
74 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x43"}]; |
75 |
|
|
$C; |
76 |
|
|
} |
77 |
|
|
|
78 |
|
|
package Encode::ISO2022::RFC1345::NATSSEFIADD; |
79 |
|
|
use vars qw/@ISA/; |
80 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
81 |
|
|
__PACKAGE__->Define (qw/NATS-SEFI-ADD iso-ir-8-2 csNATSSEFIADD/); |
82 |
|
|
|
83 |
|
|
=item NATS-SEFI-ADD |
84 |
|
|
|
85 |
|
|
NATS-SEFI-ADD (Alias: iso-ir-8-2, csNATSSEFIADD (IANA)) |
86 |
|
|
|
87 |
|
|
=cut |
88 |
|
|
|
89 |
|
|
sub __2022__common ($) { |
90 |
|
|
my $C = shift->SUPER::__2022__common; |
91 |
|
|
$C->{bit} = 7; |
92 |
|
|
$C->{C0} = $Encode::ISO2022::CHARSET{C0}->{"\x7E"}; ## empty |
93 |
|
|
# 0x20, 0x7E = undef |
94 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x44"}; |
95 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
96 |
|
|
# no replacement character available |
97 |
|
|
$C; |
98 |
|
|
} |
99 |
|
|
|
100 |
|
|
package Encode::ISO2022::RFC1345::NATSDANO; |
101 |
|
|
use vars qw/@ISA/; |
102 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
103 |
|
|
__PACKAGE__->Define (qw/NATS-DANO iso-ir-9-1 csNATSDANO/); |
104 |
|
|
|
105 |
|
|
=item NATS-DANO |
106 |
|
|
|
107 |
|
|
NATS-DANO (Alias: iso-ir-9-1, csNATSDANO (IANA)) |
108 |
|
|
|
109 |
|
|
=cut |
110 |
|
|
|
111 |
|
|
sub __2022__common ($) { |
112 |
|
|
my $C = shift->SUPER::__2022__common; |
113 |
|
|
$C->{bit} = 7; |
114 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x45"}; |
115 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
116 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x45"}]; |
117 |
|
|
$C; |
118 |
|
|
} |
119 |
|
|
|
120 |
|
|
package Encode::ISO2022::RFC1345::NATSDANOADD; |
121 |
|
|
use vars qw/@ISA/; |
122 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
123 |
|
|
__PACKAGE__->Define (qw/NATS-DANO-ADD iso-ir-9-2 csNATSDANOADD/); |
124 |
|
|
|
125 |
|
|
=item NATS-DANO-ADD |
126 |
|
|
|
127 |
|
|
NATS-DANO-ADD (Alias: iso-ir-9-2, csNATSDANOADD (IANA)) |
128 |
|
|
|
129 |
|
|
=cut |
130 |
|
|
|
131 |
|
|
sub __2022__common ($) { |
132 |
|
|
my $C = shift->SUPER::__2022__common; |
133 |
|
|
$C->{bit} = 7; |
134 |
|
|
$C->{C0} = $Encode::ISO2022::CHARSET{C0}->{"\x7E"}; ## empty |
135 |
|
|
# 0x20, 0x7E = undef |
136 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x46"}; |
137 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
138 |
|
|
# no replacement character available |
139 |
|
|
$C; |
140 |
|
|
} |
141 |
|
|
|
142 |
|
|
package Encode::ISO2022::RFC1345::csISO18Greek7Old; |
143 |
|
|
use vars qw/@ISA/; |
144 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
145 |
|
|
__PACKAGE__->Define (qw/greek7-old iso-ir-18 csISO18Greek7Old/); |
146 |
|
|
|
147 |
|
|
=item greek7-old |
148 |
|
|
|
149 |
|
|
greek7-old (Alias: iso-ir-18, csISO18Greek7Old (IANA)) |
150 |
|
|
|
151 |
|
|
=cut |
152 |
|
|
|
153 |
|
|
sub __2022__common ($) { |
154 |
|
|
my $C = shift->SUPER::__2022__common; |
155 |
|
|
$C->{bit} = 7; |
156 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x5B"}; |
157 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
158 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x5B"}]; |
159 |
|
|
$C; |
160 |
|
|
} |
161 |
|
|
|
162 |
|
|
package Encode::ISO2022::RFC1345::csISO19LatinGreek; |
163 |
|
|
use vars qw/@ISA/; |
164 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
165 |
|
|
__PACKAGE__->Define (qw/latin-greek iso-ir-19 csISO19LatinGreek/); |
166 |
|
|
|
167 |
|
|
=item latin-greek |
168 |
|
|
|
169 |
|
|
latin-greek (Alias: iso-ir-19, csISO19LatinGreek (IANA)) |
170 |
|
|
|
171 |
|
|
=cut |
172 |
|
|
|
173 |
|
|
sub __2022__common ($) { |
174 |
|
|
my $C = shift->SUPER::__2022__common; |
175 |
|
|
$C->{bit} = 7; |
176 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x5C"}; |
177 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
178 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x5C"}]; |
179 |
|
|
$C; |
180 |
|
|
} |
181 |
|
|
|
182 |
|
|
package Encode::ISO2022::RFC1345::csISO27LatinGreek1; |
183 |
|
|
use vars qw/@ISA/; |
184 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
185 |
|
|
__PACKAGE__->Define (qw/Latin-greek-1 iso-ir-27 csISO27LatinGreek1/); |
186 |
|
|
|
187 |
|
|
=item Latin-greek-1 |
188 |
|
|
|
189 |
|
|
Latin-greek-1 (Alias: iso-ir-27, csISO27LatinGreek1 (IANA)) |
190 |
|
|
|
191 |
|
|
=cut |
192 |
|
|
|
193 |
|
|
sub __2022__common ($) { |
194 |
|
|
my $C = shift->SUPER::__2022__common; |
195 |
|
|
$C->{bit} = 7; |
196 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x55"}; |
197 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
198 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
199 |
|
|
$C; |
200 |
|
|
} |
201 |
|
|
|
202 |
|
|
package Encode::ISO2022::RFC1345::ISO_5427; |
203 |
|
|
use vars qw/@ISA/; |
204 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
205 |
|
|
__PACKAGE__->Define (qw/ISO_5427 iso-ir-37 csISO5427Cyrillic/); |
206 |
|
|
|
207 |
|
|
=item ISO_5427 |
208 |
|
|
|
209 |
|
|
ISO_5427 (Alias: iso-ir-37, csISO5427Cyrillic (IANA)) |
210 |
|
|
|
211 |
|
|
=cut |
212 |
|
|
|
213 |
|
|
sub __2022__common ($) { |
214 |
|
|
my $C = shift->SUPER::__2022__common; |
215 |
|
|
$C->{bit} = 7; |
216 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x4E"}; |
217 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
218 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x4E"}]; |
219 |
|
|
$C; |
220 |
|
|
} |
221 |
|
|
|
222 |
|
|
package Encode::ISO2022::RFC1345::BS_viewdata; |
223 |
|
|
use vars qw/@ISA/; |
224 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
225 |
|
|
__PACKAGE__->Define (qw/BS_viewdata iso-ir-47 csISO47BSViewdata/); |
226 |
|
|
|
227 |
|
|
=item BS_viewdata |
228 |
|
|
|
229 |
|
|
BS_viewdata (Alias: iso-ir-47, csISO47BSViewdata (IANA)) |
230 |
|
|
|
231 |
|
|
=cut |
232 |
|
|
|
233 |
|
|
sub __2022__common ($) { |
234 |
|
|
my $C = shift->SUPER::__2022__common; |
235 |
|
|
$C->{bit} = 7; |
236 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x56"}; |
237 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
238 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x56"}]; |
239 |
|
|
$C; |
240 |
|
|
} |
241 |
|
|
|
242 |
|
|
package Encode::ISO2022::RFC1345::INIS; |
243 |
|
|
use vars qw/@ISA/; |
244 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
245 |
|
|
__PACKAGE__->Define (qw/INIS iso-ir-49 csISO49INIS/); |
246 |
|
|
|
247 |
|
|
=item INIS |
248 |
|
|
|
249 |
|
|
INIS (Alias: iso-ir-49, csISO49INIS (IANA)) |
250 |
|
|
|
251 |
|
|
=cut |
252 |
|
|
|
253 |
|
|
sub __2022__common ($) { |
254 |
|
|
my $C = shift->SUPER::__2022__common; |
255 |
|
|
$C->{bit} = 7; |
256 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x57"}; |
257 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
258 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
259 |
|
|
$C; |
260 |
|
|
} |
261 |
|
|
|
262 |
|
|
package Encode::ISO2022::RFC1345::csISO50INIS8; |
263 |
|
|
use vars qw/@ISA/; |
264 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
265 |
|
|
__PACKAGE__->Define (qw/INIS-8 iso-ir-50 csISO50INIS8/); |
266 |
|
|
|
267 |
|
|
=item INIS-8 |
268 |
|
|
|
269 |
|
|
INIS-8 (Alias: iso-ir-50, csISO50INIS8 (IANA)) |
270 |
|
|
|
271 |
|
|
=cut |
272 |
|
|
|
273 |
|
|
sub __2022__common ($) { |
274 |
|
|
my $C = shift->SUPER::__2022__common; |
275 |
|
|
$C->{bit} = 7; |
276 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x5D"}; |
277 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
278 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
279 |
|
|
$C; |
280 |
|
|
} |
281 |
|
|
|
282 |
|
|
package Encode::ISO2022::RFC1345::csISO51INISCyrillic; |
283 |
|
|
use vars qw/@ISA/; |
284 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
285 |
|
|
__PACKAGE__->Define (qw/INIS-cyrillic iso-ir-51 csISO51INISCyrillic/); |
286 |
|
|
|
287 |
|
|
=item INIS-cyrillic |
288 |
|
|
|
289 |
|
|
INIS-cyrillic (Alias: iso-ir-51, csISO51INISCyrillic (IANA)) |
290 |
|
|
|
291 |
|
|
=cut |
292 |
|
|
|
293 |
|
|
sub __2022__common ($) { |
294 |
|
|
my $C = shift->SUPER::__2022__common; |
295 |
|
|
$C->{bit} = 7; |
296 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x5E"}; |
297 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
298 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
299 |
|
|
$C; |
300 |
|
|
} |
301 |
|
|
|
302 |
|
|
package Encode::ISO2022::RFC1345::ISO5427Cyrillic1981; |
303 |
|
|
use vars qw/@ISA/; |
304 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
305 |
|
|
__PACKAGE__->Define (qw/ISO_5427:1981 iso-ir-54 ISO5427Cyrillic1981/); |
306 |
|
|
|
307 |
|
|
=item ISO_5427:1981 |
308 |
|
|
|
309 |
|
|
ISO_5427:1981 (Alias: iso-ir-54, ISO5427Cyrillic1981 (IANA)) |
310 |
|
|
|
311 |
|
|
=cut |
312 |
|
|
|
313 |
|
|
sub __2022__common ($) { |
314 |
|
|
my $C = shift->SUPER::__2022__common; |
315 |
|
|
$C->{bit} = 7; |
316 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x51"}; |
317 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
318 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
319 |
|
|
$C; |
320 |
|
|
} |
321 |
|
|
|
322 |
|
|
package Encode::ISO2022::RFC1345::csISO5428Greek; |
323 |
|
|
use vars qw/@ISA/; |
324 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
325 |
|
|
__PACKAGE__->Define (qw/ISO_5428:1980 iso-ir-55 csISO5428Greek/); |
326 |
|
|
|
327 |
|
|
=item ISO_5428:1980 |
328 |
|
|
|
329 |
|
|
ISO_5428:1980 (Alias: iso-ir-55, csISO5428Greek (IANA)) |
330 |
|
|
|
331 |
|
|
=cut |
332 |
|
|
|
333 |
|
|
sub __2022__common ($) { |
334 |
|
|
my $C = shift->SUPER::__2022__common; |
335 |
|
|
$C->{bit} = 7; |
336 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x53"}; |
337 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
338 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
339 |
|
|
$C; |
340 |
|
|
} |
341 |
|
|
|
342 |
wakaba |
1.2 |
package Encode::ISO2022::RFC1345::greek7; |
343 |
|
|
use vars qw/@ISA/; |
344 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
345 |
|
|
__PACKAGE__->Define (qw/greek7 iso-ir-88 csISO88Greek7/); |
346 |
|
|
|
347 |
|
|
=item greek7 |
348 |
|
|
|
349 |
|
|
greek7 (Alias: iso-ir-88, csISO88Greek7 (IANA)) |
350 |
|
|
|
351 |
|
|
=cut |
352 |
|
|
|
353 |
|
|
sub __2022__common ($) { |
354 |
|
|
my $C = shift->SUPER::__2022__common; |
355 |
|
|
$C->{bit} = 7; |
356 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x6A"}; |
357 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
358 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x6A"}]; |
359 |
|
|
$C; |
360 |
|
|
} |
361 |
|
|
|
362 |
|
|
package Encode::ISO2022::RFC1345::ASMO_449; |
363 |
|
|
use vars qw/@ISA/; |
364 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
365 |
|
|
__PACKAGE__->Define (qw/ASMO_449 ISO_9036 arabic7 iso-ir-89 csISO89ASMO449/); |
366 |
|
|
|
367 |
|
|
=item ASMO_449 |
368 |
|
|
|
369 |
|
|
ASMO_449 (Alias: ISO_9036, arabic7, iso-ir-89, csISO89ASMO449 (IANA)) |
370 |
|
|
|
371 |
|
|
=cut |
372 |
|
|
|
373 |
|
|
sub __2022__common ($) { |
374 |
|
|
my $C = shift->SUPER::__2022__common; |
375 |
|
|
$C->{bit} = 7; |
376 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x6B"}; |
377 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
378 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x6B"}]; |
379 |
|
|
$C; |
380 |
|
|
} |
381 |
|
|
|
382 |
|
|
package Encode::ISO2022::RFC1345::csISO91JISC62291984a; |
383 |
|
|
use vars qw/@ISA/; |
384 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
385 |
|
|
__PACKAGE__->Define (qw/JIS_C6229-1984-a iso-ir-91 jp-ocr-a csISO91JISC62291984a/); |
386 |
|
|
|
387 |
|
|
=item JIS_C6229-1984-a |
388 |
|
|
|
389 |
|
|
JIS_C6229-1984-a (Alias: iso-ir-91, jp-ocr-a, csISO91JISC62291984a (IANA)) |
390 |
|
|
|
391 |
|
|
=cut |
392 |
|
|
|
393 |
|
|
sub __2022__common ($) { |
394 |
|
|
my $C = shift->SUPER::__2022__common; |
395 |
|
|
$C->{bit} = 7; |
396 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x6D"}; |
397 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
398 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x6D"}]; |
399 |
|
|
$C; |
400 |
|
|
} |
401 |
|
|
|
402 |
|
|
package Encode::ISO2022::RFC1345::csISO92JISC62991984b; |
403 |
|
|
use vars qw/@ISA/; |
404 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
405 |
|
|
__PACKAGE__->Define (qw/JIS_C6229-1984-b iso-ir-92 ISO646-JP-OCR-B jp-ocr-b |
406 |
|
|
csISO92JISC62991984b/); |
407 |
|
|
|
408 |
|
|
=item JIS_C6229-1984-b |
409 |
|
|
|
410 |
|
|
JIS_C6229-1984-b (Alias: iso-ir-92, ISO646-JP-OCR-B, jp-ocr-b, |
411 |
|
|
csISO92JISC62991984b (IANA)) |
412 |
|
|
|
413 |
|
|
=cut |
414 |
|
|
|
415 |
|
|
sub __2022__common ($) { |
416 |
|
|
my $C = shift->SUPER::__2022__common; |
417 |
|
|
$C->{bit} = 7; |
418 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x6E"}; |
419 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
420 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x6E"}]; |
421 |
|
|
$C; |
422 |
|
|
} |
423 |
|
|
|
424 |
|
|
package Encode::ISO2022::RFC1345::csISO93JIS62291984badd; |
425 |
|
|
use vars qw/@ISA/; |
426 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
427 |
|
|
__PACKAGE__->Define (qw/JIS_C6229-1984-b-add iso-ir-93 jp-ocr-b-add |
428 |
|
|
csISO93JIS62291984badd/); |
429 |
|
|
|
430 |
|
|
=item JIS_C6229-1984-b-add |
431 |
|
|
|
432 |
|
|
JIS_C6229-1984-b-add (Alias: iso-ir-93, jp-ocr-b-add, |
433 |
|
|
csISO93JIS62291984badd (IANA)) |
434 |
|
|
|
435 |
|
|
=cut |
436 |
|
|
|
437 |
|
|
sub __2022__common ($) { |
438 |
|
|
my $C = shift->SUPER::__2022__common; |
439 |
|
|
$C->{bit} = 7; |
440 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x6F"}; |
441 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
442 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
443 |
|
|
$C; |
444 |
|
|
} |
445 |
|
|
|
446 |
|
|
package Encode::ISO2022::RFC1345::csISO94JIS62291984hand; |
447 |
|
|
use vars qw/@ISA/; |
448 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
449 |
|
|
__PACKAGE__->Define (qw/JIS_C6229-1984-hand iso-ir-94 jp-ocr-hand |
450 |
|
|
csISO94JIS62291984hand/); |
451 |
|
|
|
452 |
|
|
=item JIS_C6229-1984-hand |
453 |
|
|
|
454 |
|
|
JIS_C6229-1984-hand (Alias: iso-ir-94, jp-ocr-hand, |
455 |
|
|
csISO94JIS62291984hand (IANA)) |
456 |
|
|
|
457 |
|
|
=cut |
458 |
|
|
|
459 |
|
|
sub __2022__common ($) { |
460 |
|
|
my $C = shift->SUPER::__2022__common; |
461 |
|
|
$C->{bit} = 7; |
462 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x70"}; |
463 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
464 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x70"}]; |
465 |
|
|
$C; |
466 |
|
|
} |
467 |
|
|
|
468 |
|
|
package Encode::ISO2022::RFC1345::csISO93JIS62291984badd; |
469 |
|
|
use vars qw/@ISA/; |
470 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
471 |
|
|
__PACKAGE__->Define (qw/JIS_C6229-1984-hand-add iso-ir-95 jp-ocr-hand-add |
472 |
|
|
csISO93JIS62291984badd/); |
473 |
|
|
|
474 |
|
|
=item JIS_C6229-1984-hand-add |
475 |
|
|
|
476 |
|
|
JIS_C6229-1984-hand-add (Alias: iso-ir-95, jp-ocr-hand-add, |
477 |
|
|
csISO93JIS62291984badd (IANA)) |
478 |
|
|
|
479 |
|
|
=cut |
480 |
|
|
|
481 |
|
|
sub __2022__common ($) { |
482 |
|
|
my $C = shift->SUPER::__2022__common; |
483 |
|
|
$C->{bit} = 7; |
484 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x71"}; |
485 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
486 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
487 |
|
|
$C; |
488 |
|
|
} |
489 |
|
|
|
490 |
|
|
package Encode::ISO2022::RFC1345::csISO96JISC62291984kana; |
491 |
|
|
use vars qw/@ISA/; |
492 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
493 |
|
|
__PACKAGE__->Define (qw/JIS_C6229-1984-kana iso-ir-96 |
494 |
|
|
csISO96JISC62291984kana/); |
495 |
|
|
|
496 |
|
|
=item JIS_C6229-1984-kana |
497 |
|
|
|
498 |
|
|
JIS_C6229-1984-kana (Alias: iso-ir-96, |
499 |
|
|
csISO96JISC62291984kana (IANA)) |
500 |
|
|
|
501 |
|
|
=cut |
502 |
|
|
|
503 |
|
|
sub __2022__common ($) { |
504 |
|
|
my $C = shift->SUPER::__2022__common; |
505 |
|
|
$C->{bit} = 7; |
506 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x72"}; |
507 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
508 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
509 |
|
|
$C; |
510 |
|
|
} |
511 |
|
|
|
512 |
|
|
package Encode::ISO2022::RFC1345::csISO2033; |
513 |
|
|
use vars qw/@ISA/; |
514 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
515 |
|
|
__PACKAGE__->Define (qw/ISO_2033-1983 iso-ir-98 e13b |
516 |
|
|
csISO2033/); |
517 |
|
|
|
518 |
|
|
=item ISO_2033-1983 |
519 |
|
|
|
520 |
|
|
ISO_2033-1983 (Alias: iso-ir-98, e13b, |
521 |
|
|
csISO2033 (IANA)) |
522 |
|
|
|
523 |
|
|
=cut |
524 |
|
|
|
525 |
|
|
sub __2022__common ($) { |
526 |
|
|
my $C = shift->SUPER::__2022__common; |
527 |
|
|
$C->{bit} = 7; |
528 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x73"}; |
529 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
530 |
|
|
$C->{option}->{undef_char} = ["\x20"]; |
531 |
|
|
$C; |
532 |
|
|
} |
533 |
|
|
|
534 |
|
|
package Encode::ISO2022::RFC1345::csISO102T617bit; |
535 |
|
|
use vars qw/@ISA/; |
536 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
537 |
|
|
__PACKAGE__->Define (qw/T.61-7bit iso-ir-102 csISO102T617bit/); |
538 |
|
|
|
539 |
|
|
=item T.61-7bit |
540 |
|
|
|
541 |
|
|
T.61-7bit (Alias: iso-ir-102, csISO102T617bit (IANA)) |
542 |
|
|
|
543 |
|
|
=cut |
544 |
|
|
|
545 |
|
|
sub __2022__common ($) { |
546 |
|
|
my $C = shift->SUPER::__2022__common; |
547 |
|
|
$C->{bit} = 7; |
548 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x75"}; |
549 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
550 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x75"}]; |
551 |
|
|
$C; |
552 |
|
|
} |
553 |
|
|
|
554 |
|
|
|
555 |
|
|
package Encode::ISO2022::RFC1345::csISO146Serbian; |
556 |
|
|
use vars qw/@ISA/; |
557 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
558 |
|
|
__PACKAGE__->Define (qw/JUS_I.B1.003-serb iso-ir-146 serbian csISO146Serbian/); |
559 |
|
|
|
560 |
|
|
=item JUS_I.B1.003-serb |
561 |
|
|
|
562 |
|
|
JUS_I.B1.003-serb (Alias: iso-ir-146, serbian, csISO146Serbian (IANA)) |
563 |
|
|
|
564 |
|
|
=cut |
565 |
|
|
|
566 |
|
|
sub __2022__common ($) { |
567 |
|
|
my $C = shift->SUPER::__2022__common; |
568 |
|
|
$C->{bit} = 7; |
569 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x7B"}; |
570 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
571 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x7B"}]; |
572 |
|
|
$C; |
573 |
|
|
} |
574 |
|
|
|
575 |
|
|
package Encode::ISO2022::RFC1345::csISO147Macedonian; |
576 |
|
|
use vars qw/@ISA/; |
577 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
578 |
|
|
__PACKAGE__->Define (qw/JUS_I.B1.003-mac macedonian iso-ir-147 |
579 |
|
|
csISO147Macedonian/); |
580 |
|
|
|
581 |
|
|
=item JUS_I.B1.003-mac |
582 |
|
|
|
583 |
|
|
JUS_I.B1.003-mac (Alias: macedonian, iso-ir-147, csISO147Macedonian (IANA)) |
584 |
|
|
|
585 |
|
|
=cut |
586 |
|
|
|
587 |
|
|
sub __2022__common ($) { |
588 |
|
|
my $C = shift->SUPER::__2022__common; |
589 |
|
|
$C->{bit} = 7; |
590 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x7D"}; |
591 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
592 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x7D"}]; |
593 |
|
|
$C; |
594 |
|
|
} |
595 |
|
|
|
596 |
|
|
package Encode::ISO2022::RFC1345::csISO150GreekCCITT; |
597 |
|
|
use vars qw/@ISA/; |
598 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
599 |
|
|
__PACKAGE__->Define (qw/greek-ccitt iso-ir-150 csISO150 |
600 |
|
|
csISO150GreekCCITT/); |
601 |
|
|
|
602 |
|
|
=item greek-ccitt |
603 |
|
|
|
604 |
|
|
greek-ccitt (Alias: iso-ir-150, csISO150 (IANA), csISO150GreekCCITT (IANA)) |
605 |
|
|
|
606 |
|
|
=cut |
607 |
|
|
|
608 |
|
|
sub __2022__common ($) { |
609 |
|
|
my $C = shift->SUPER::__2022__common; |
610 |
|
|
$C->{bit} = 7; |
611 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x21\x40"}; |
612 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
613 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x21\x40"}]; |
614 |
|
|
$C; |
615 |
|
|
} |
616 |
|
|
|
617 |
|
|
|
618 |
|
|
|
619 |
|
|
|
620 |
|
|
package Encode::ISO2022::RFC1345::csISO70VideotexSupp1; |
621 |
|
|
use vars qw/@ISA/; |
622 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
623 |
|
|
__PACKAGE__->Define (qw/videotex-suppl iso-ir-70 csISO70VideotexSupp1/); |
624 |
|
|
|
625 |
|
|
=item videotex-suppl |
626 |
|
|
|
627 |
|
|
videotex-suppl (Alias: iso-ir-70, csISO70VideotexSupp1 (IANA)) |
628 |
|
|
|
629 |
|
|
=cut |
630 |
|
|
|
631 |
|
|
sub __2022__common ($) { |
632 |
|
|
my $C = shift->SUPER::__2022__common; |
633 |
|
|
$C->{bit} = 8; |
634 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x74"}; |
635 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G94}->{"\x62"}; |
636 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
637 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x74"}]; |
638 |
|
|
$C; |
639 |
|
|
} |
640 |
|
|
|
641 |
|
|
package Encode::ISO2022::RFC1345::csISO90; |
642 |
|
|
use vars qw/@ISA/; |
643 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
644 |
|
|
__PACKAGE__->Define (qw/iso-ir-90 csISO90/); |
645 |
|
|
|
646 |
|
|
=item iso-ir-90 |
647 |
|
|
|
648 |
|
|
iso-ir-90 (Alias: csISO90 (IANA)) |
649 |
|
|
|
650 |
|
|
=cut |
651 |
|
|
|
652 |
|
|
sub __2022__common ($) { |
653 |
|
|
my $C = shift->SUPER::__2022__common; |
654 |
|
|
$C->{bit} = 8; |
655 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
656 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G94}->{"\x6C"}; |
657 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
658 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x6C"}]; |
659 |
|
|
$C; |
660 |
|
|
} |
661 |
|
|
|
662 |
|
|
package Encode::ISO2022::RFC1345::csISO2033; |
663 |
|
|
use vars qw/@ISA/; |
664 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
665 |
|
|
__PACKAGE__->Define (qw/ANSI_X3.110-1983 iso-ir-99 CSA_T500-1983 NAPLPS |
666 |
|
|
csISO99NAPLPS |
667 |
|
|
T.101-G2 iso-ir-128 csISO128T101G2/); |
668 |
|
|
|
669 |
|
|
=item ANSI_X3.110-1983 |
670 |
|
|
|
671 |
|
|
ANSI_X3.110-1983 (Alias: iso-ir-99, CSA_T500-1983, NAPLPS, |
672 |
|
|
csISO99NAPLPS (IANA), T.101-G2, iso-ir-128, csISO128T101G2 (IANA)) |
673 |
|
|
|
674 |
|
|
Note that C<ANSI_X3.110-1983> and C<T.101-G2> is defined as |
675 |
|
|
different charset in RFC 1345 and IANAREG although they have |
676 |
|
|
same definition. |
677 |
|
|
|
678 |
|
|
=cut |
679 |
|
|
|
680 |
|
|
sub __2022__common ($) { |
681 |
|
|
my $C = shift->SUPER::__2022__common; |
682 |
|
|
$C->{bit} = 8; |
683 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x74"}; |
684 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G94}->{"\x7C"}; |
685 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
686 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x74"}]; |
687 |
|
|
$C; |
688 |
|
|
} |
689 |
|
|
|
690 |
|
|
## ISO_8859-1:1987 iso-ir-100 ISO_8859-1 ISO-8859-1 latin1 l1 IBM819 CP819 |
691 |
|
|
## csISOLatin1 (IANA) |
692 |
|
|
## ISO_8859-2:1987 iso-ir-101 ISO_8859-2 ISO-8859-2 latin2 l2 csISOLatin2 (IANA) |
693 |
|
|
|
694 |
|
|
package Encode::ISO2022::RFC1345::csISO103T618bit; |
695 |
|
|
use vars qw/@ISA/; |
696 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
697 |
|
|
__PACKAGE__->Define (qw/T.61-8bit T.61 iso-ir-103 csISO103T618bit/); |
698 |
|
|
|
699 |
|
|
=item T.61-8bit |
700 |
|
|
|
701 |
|
|
T.61-8bit (Alias: T.61, iso-ir-103, csISO103T618bit (IANA)) |
702 |
|
|
|
703 |
|
|
=cut |
704 |
|
|
|
705 |
|
|
sub __2022__common ($) { |
706 |
|
|
my $C = shift->SUPER::__2022__common; |
707 |
|
|
$C->{bit} = 8; |
708 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x7E"}; |
709 |
|
|
## TODO: GL is subset of ISO-IR 102 |
710 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x76"}; |
711 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
712 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x7E"}]; |
713 |
|
|
$C; |
714 |
|
|
} |
715 |
|
|
|
716 |
|
|
# ISO_8859-3:1988 iso-ir-109 ISO_8859-3 ISO-8859-3 latin3 l3 csISOLatin3 (IANA) |
717 |
|
|
# ISO_8859-4:1988 iso-ir-110 ISO_8859-4 ISO-8859-4 latin4 l4 csISOLatin4 (IANA) |
718 |
|
|
|
719 |
|
|
package Encode::ISO2022::RFC1345::csISO111ECMACyrillic; |
720 |
|
|
use vars qw/@ISA/; |
721 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
722 |
|
|
__PACKAGE__->Define (qw/ECMA-cyrillic iso-ir-111 csISO111ECMACyrillic/); |
723 |
|
|
|
724 |
|
|
=item ECMA-cyrillic |
725 |
|
|
|
726 |
|
|
ECMA-cyrillic (Alias: iso-ir-111, csISO111ECMACyrillic (IANA)) |
727 |
|
|
|
728 |
|
|
=cut |
729 |
|
|
|
730 |
|
|
sub __2022__common ($) { |
731 |
|
|
my $C = shift->SUPER::__2022__common; |
732 |
|
|
$C->{bit} = 8; |
733 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
734 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x40"}; |
735 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
736 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
737 |
|
|
$C; |
738 |
|
|
} |
739 |
|
|
|
740 |
|
|
package Encode::ISO2022::RFC1345::csISO123CSAZ24341985gr; |
741 |
|
|
use vars qw/@ISA/; |
742 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
743 |
|
|
__PACKAGE__->Define (qw/CSA_Z243.4-1985-gr iso-ir-123 csISO123CSAZ24341985gr/); |
744 |
|
|
|
745 |
|
|
=item CSA_Z243.4-1985-gr |
746 |
|
|
|
747 |
|
|
CSA_Z243.4-1985-gr (Alias: iso-ir-123, csISO123CSAZ24341985gr (IANA)) |
748 |
|
|
|
749 |
|
|
=cut |
750 |
|
|
|
751 |
|
|
sub __2022__common ($) { |
752 |
|
|
my $C = shift->SUPER::__2022__common; |
753 |
|
|
$C->{bit} = 8; |
754 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
755 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x45"}; |
756 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
757 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
758 |
|
|
$C; |
759 |
|
|
} |
760 |
|
|
|
761 |
|
|
# ISO_8859-7:1987 iso-ir-126 ISO_8859-7 ISO-8859-7 ELOT_928 ECMA-118 |
762 |
|
|
# greek greek8 csISOLatinGreek (IANA) |
763 |
|
|
# ISO_8859-6:1987 iso-ir-127 ISO_8859-6 ISO-8859-6 ECMA-114 ASMO-708 |
764 |
|
|
# arabic csISOLatinArabic (IANA) |
765 |
|
|
# ISO_8859-8:1988 iso-ir-138 ISO_8859-8 ISO-8859-8 hebrew csISOLatinHebrew (IANA) |
766 |
|
|
|
767 |
|
|
package Encode::ISO2022::RFC1345::CSN_369103; |
768 |
|
|
use vars qw/@ISA/; |
769 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
770 |
|
|
__PACKAGE__->Define (qw/CSN_369103 iso-ir-139 csISO139CSN369103/); |
771 |
|
|
|
772 |
|
|
=item CSN_369103 |
773 |
|
|
|
774 |
|
|
CSN_369103 (Alias: iso-ir-139, csISO139CSN369103 (IANA)) |
775 |
|
|
|
776 |
|
|
=cut |
777 |
|
|
|
778 |
|
|
sub __2022__common ($) { |
779 |
|
|
my $C = shift->SUPER::__2022__common; |
780 |
|
|
$C->{bit} = 8; |
781 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
782 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x49"}; |
783 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
784 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
785 |
|
|
$C; |
786 |
|
|
} |
787 |
|
|
|
788 |
|
|
package Encode::ISO2022::RFC1345::csISOTextComm; |
789 |
|
|
use vars qw/@ISA/; |
790 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
791 |
|
|
__PACKAGE__->Define (qw/ISO_6937-2-add iso-ir-142 csISOTextComm/); |
792 |
|
|
|
793 |
|
|
=item ISO_6937-2-add |
794 |
|
|
|
795 |
|
|
ISO_6937-2-add (Alias: iso-ir-142, csISOTextComm (IANA)) |
796 |
|
|
|
797 |
|
|
=cut |
798 |
|
|
|
799 |
|
|
sub __2022__common ($) { |
800 |
|
|
my $C = shift->SUPER::__2022__common; |
801 |
|
|
$C->{bit} = 8; |
802 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
803 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x4A"}; |
804 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
805 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
806 |
|
|
$C; |
807 |
|
|
} |
808 |
|
|
|
809 |
|
|
package Encode::ISO2022::RFC1345::csISO143IECP271; |
810 |
|
|
use vars qw/@ISA/; |
811 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
812 |
|
|
__PACKAGE__->Define (qw/IEC_P27-1 iso-ir-143 csISO143IECP271/); |
813 |
|
|
|
814 |
|
|
=item IEC_P27-1 |
815 |
|
|
|
816 |
|
|
IEC_P27-1 (Alias: iso-ir-143, csISO143IECP271 (IANA)) |
817 |
|
|
|
818 |
|
|
=cut |
819 |
|
|
|
820 |
|
|
sub __2022__common ($) { |
821 |
|
|
my $C = shift->SUPER::__2022__common; |
822 |
|
|
$C->{bit} = 8; |
823 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
824 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x4B"}; |
825 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
826 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
827 |
|
|
$C; |
828 |
|
|
} |
829 |
|
|
|
830 |
|
|
# ISO_8859-5:1988 iso-ir-144 ISO_8859-5 ISO-8859-5 cyrillic csISOLatinCyrillic (IANA) |
831 |
|
|
# ISO_8859-9:1989 iso-ir-148 ISO_8859-9 ISO-8859-9 latin5 l5 csISOLatin5 (IANA) |
832 |
|
|
|
833 |
|
|
package Encode::ISO2022::RFC1345::csISO6937Add; |
834 |
|
|
use vars qw/@ISA/; |
835 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
836 |
|
|
__PACKAGE__->Define (qw/ISO_6937-2-25 iso-ir-152 csISO6937Add/); |
837 |
|
|
|
838 |
|
|
=item ISO_6937-2-25 |
839 |
|
|
|
840 |
|
|
ISO_6937-2-25 (Alias: iso-ir-152, csISO6937Add (IANA)) |
841 |
|
|
|
842 |
|
|
=cut |
843 |
|
|
|
844 |
|
|
sub __2022__common ($) { |
845 |
|
|
my $C = shift->SUPER::__2022__common; |
846 |
|
|
$C->{bit} = 8; |
847 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
848 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x4E"}; |
849 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
850 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
851 |
|
|
$C; |
852 |
|
|
} |
853 |
|
|
|
854 |
|
|
package Encode::ISO2022::RFC1345::csISO153GOST1976874; |
855 |
|
|
use vars qw/@ISA/; |
856 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
857 |
|
|
__PACKAGE__->Define (qw/GOST_19768-74 ST_SEV_358-88 iso-ir-153 csISO153GOST1976874/); |
858 |
|
|
|
859 |
|
|
=item GOST_19768-74 |
860 |
|
|
|
861 |
|
|
GOST_19768-74 (Alias: ST_SEV_358-88, iso-ir-153, csISO153GOST1976874 (IANA)) |
862 |
|
|
|
863 |
|
|
=cut |
864 |
|
|
|
865 |
|
|
sub __2022__common ($) { |
866 |
|
|
my $C = shift->SUPER::__2022__common; |
867 |
|
|
$C->{bit} = 8; |
868 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
869 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x4F"}; |
870 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
871 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
872 |
|
|
$C; |
873 |
|
|
} |
874 |
|
|
|
875 |
|
|
package Encode::ISO2022::RFC1345::csISO8859Supp; |
876 |
|
|
use vars qw/@ISA/; |
877 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
878 |
|
|
__PACKAGE__->Define (qw/ISO_8859-supp iso-ir-154 latin1-2-5 csISO8859Supp/); |
879 |
|
|
|
880 |
|
|
=item ISO_8859-supp |
881 |
|
|
|
882 |
|
|
ISO_8859-supp (Alias: iso-ir-154, latin1-2-5, csISO8859Supp (IANA)) |
883 |
|
|
|
884 |
|
|
=cut |
885 |
|
|
|
886 |
|
|
sub __2022__common ($) { |
887 |
|
|
my $C = shift->SUPER::__2022__common; |
888 |
|
|
$C->{bit} = 8; |
889 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
890 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x50"}; |
891 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
892 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
893 |
|
|
$C; |
894 |
|
|
} |
895 |
|
|
|
896 |
|
|
package Encode::ISO2022::RFC1345::csISO10367Box; |
897 |
|
|
use vars qw/@ISA/; |
898 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
899 |
|
|
__PACKAGE__->Define (qw/ISO_10367-box iso-ir-155 csISO10367Box/); |
900 |
|
|
|
901 |
|
|
=item ISO_10367-box |
902 |
|
|
|
903 |
|
|
ISO_10367-box (Alias: iso-ir-155, csISO10367Box (IANA)) |
904 |
|
|
|
905 |
|
|
=cut |
906 |
|
|
|
907 |
|
|
sub __2022__common ($) { |
908 |
|
|
my $C = shift->SUPER::__2022__common; |
909 |
|
|
$C->{bit} = 8; |
910 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
911 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x51"}; |
912 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
913 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
914 |
|
|
$C; |
915 |
|
|
} |
916 |
|
|
|
917 |
|
|
# latin6 iso-ir-157 l6 ISO-8859-10 (IANA) ISO_8859-10:1992 (IANA) csISOLatin6 (IANA) |
918 |
|
|
|
919 |
|
|
package Encode::ISO2022::RFC1345::csISO158Lap; |
920 |
|
|
use vars qw/@ISA/; |
921 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
922 |
|
|
__PACKAGE__->Define (qw/latin-lap lap iso-ir-158 csISO158Lap/); |
923 |
|
|
|
924 |
|
|
=item latin-lap |
925 |
|
|
|
926 |
|
|
latin-lap (Alias: lap, iso-ir-158, csISO158Lap (IANA)) |
927 |
|
|
|
928 |
|
|
=cut |
929 |
|
|
|
930 |
|
|
sub __2022__common ($) { |
931 |
|
|
my $C = shift->SUPER::__2022__common; |
932 |
|
|
$C->{bit} = 8; |
933 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x42"}; |
934 |
|
|
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x58"}; |
935 |
|
|
$C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
936 |
|
|
$C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x42"}]; |
937 |
|
|
$C; |
938 |
|
|
} |
939 |
|
|
|
940 |
wakaba |
1.1 |
|
941 |
|
|
package Encode::ISO2022::RFC1345::csISO42JISC62261978; |
942 |
|
|
use vars qw/@ISA/; |
943 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
944 |
|
|
__PACKAGE__->Define (qw/JIS_C6226-1978 iso-ir-42 csISO42JISC62261978/); |
945 |
|
|
|
946 |
|
|
=item JIS_C6226-1978 |
947 |
|
|
|
948 |
|
|
JIS_C6226-1978 (Alias: iso-ir-42, csISO42JISC62261978 (IANA)) |
949 |
|
|
|
950 |
|
|
=cut |
951 |
|
|
|
952 |
|
|
sub __2022__common ($) { |
953 |
|
|
my $C = shift->SUPER::__2022__common; |
954 |
|
|
$C->{bit} = 7; |
955 |
|
|
# 0x20, 0x7F = undef |
956 |
|
|
$C->{C0} = $Encode::ISO2022::CHARSET{C0}->{"\x7E"}; |
957 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94n}->{"\x40"}; |
958 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
959 |
|
|
$C->{option}->{undef_char} = ["\x22\x2E", {type => 'G94n', charset => "\x40"}]; |
960 |
|
|
$C; |
961 |
|
|
} |
962 |
|
|
|
963 |
|
|
package Encode::ISO2022::RFC1345::GB_2312; |
964 |
|
|
use vars qw/@ISA/; |
965 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
966 |
|
|
__PACKAGE__->Define (qw/GB_2312-80 iso-ir-58 chinese csISO58GB231280/); |
967 |
|
|
|
968 |
|
|
=item GB_2312-80 |
969 |
|
|
|
970 |
|
|
GB_2312-80 (Alias: iso-ir-58, chinese, csISO58GB231280 (IANA)) |
971 |
|
|
|
972 |
|
|
=cut |
973 |
|
|
|
974 |
|
|
sub __2022__common ($) { |
975 |
|
|
my $C = shift->SUPER::__2022__common; |
976 |
|
|
$C->{bit} = 7; |
977 |
|
|
# 0x20, 0x7F = undef |
978 |
|
|
$C->{C0} = $Encode::ISO2022::CHARSET{C0}->{"\x7E"}; |
979 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94n}->{"\x41"}; |
980 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
981 |
|
|
$C->{option}->{undef_char} = ["\x21\x7E", {type => 'G94n', charset => "\x41"}]; |
982 |
|
|
$C; |
983 |
|
|
} |
984 |
|
|
|
985 |
wakaba |
1.2 |
package Encode::ISO2022::RFC1345::csISO87JISX0208; |
986 |
|
|
use vars qw/@ISA/; |
987 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
988 |
|
|
__PACKAGE__->Define (qw/JIS_C6226-1983 iso-ir-87 x0208 |
989 |
|
|
JIS_X0208-1983 csISO87JISX0208 JIS0208/); |
990 |
|
|
|
991 |
|
|
=item JIS_C6226-1983 |
992 |
|
|
|
993 |
|
|
JIS_C6226-1978 (Alias: iso-ir-87, x0208, JIS_X0208-1983, csISO87JISX0208 (IANA), |
994 |
|
|
JIS0208 (Not in RFC 1345)) |
995 |
|
|
|
996 |
|
|
=cut |
997 |
|
|
|
998 |
|
|
sub __2022__common ($) { |
999 |
|
|
my $C = shift->SUPER::__2022__common; |
1000 |
|
|
$C->{bit} = 7; |
1001 |
|
|
# 0x20, 0x7F = undef |
1002 |
|
|
$C->{C0} = $Encode::ISO2022::CHARSET{C0}->{"\x7E"}; |
1003 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94n}->{"\x42"}; |
1004 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
1005 |
|
|
$C->{option}->{undef_char} = ["\x22\x2E", {type => 'G94n', charset => "\x42"}]; |
1006 |
|
|
$C; |
1007 |
|
|
} |
1008 |
|
|
|
1009 |
|
|
package Encode::ISO2022::RFC1345::csKSC56011987; |
1010 |
|
|
use vars qw/@ISA/; |
1011 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
1012 |
|
|
__PACKAGE__->Define (qw/KS_C_5601-1987 iso-ir-149 KS_C_5601-1989 KSC_5601 |
1013 |
|
|
korean csKSC56011987 KSC5601 KS_C_5601 KSC5601_1992 KSX1001 KS_X_1001:1992/); |
1014 |
|
|
|
1015 |
|
|
=item KS_C_5601-1987 |
1016 |
|
|
|
1017 |
|
|
KS_C_5601-1987 (Alias: iso-ir-149, KS_C_5601-1989, KSC_5601, korean, |
1018 |
|
|
csKSC56011987 (IANA), KSC5601 (Not in RFC 1345), KS_C_5601 (Not in RFC 1345), |
1019 |
|
|
KSC5601_1992 (Not in RFC 1345), KSX1001 (Not in RFC 1345), |
1020 |
|
|
KS_X_1001:1992 (Not in RFC 1345)) |
1021 |
|
|
|
1022 |
|
|
Some implementions use this name to label UHC (Unified Hangul |
1023 |
|
|
Code). It is a serious bug. |
1024 |
|
|
|
1025 |
|
|
=cut |
1026 |
|
|
|
1027 |
|
|
sub __2022__common ($) { |
1028 |
|
|
my $C = shift->SUPER::__2022__common; |
1029 |
|
|
$C->{bit} = 7; |
1030 |
|
|
# 0x20, 0x7F = undef |
1031 |
|
|
$C->{C0} = $Encode::ISO2022::CHARSET{C0}->{"\x7E"}; |
1032 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94n}->{"\x4C"}; |
1033 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
1034 |
|
|
$C->{option}->{undef_char} = ["\x21\x6B", {type => 'G94n', charset => "\x4C"}]; |
1035 |
|
|
$C; |
1036 |
|
|
} |
1037 |
|
|
|
1038 |
|
|
package Encode::ISO2022::RFC1345::csISO159JISX02121990; |
1039 |
|
|
use vars qw/@ISA/; |
1040 |
|
|
push @ISA, 'Encode::ISO2022::RFC1345'; |
1041 |
|
|
__PACKAGE__->Define (qw/JIS_X0212-1990 x0212 iso-ir-159 csISO159JISX02121990/); |
1042 |
|
|
|
1043 |
|
|
=item JIS_X0212-1990 |
1044 |
|
|
|
1045 |
|
|
JIS_X0212-1990 (Alias: x0212, iso-ir-159, csISO159JISX02121990 (IANA)) |
1046 |
|
|
|
1047 |
|
|
=cut |
1048 |
|
|
|
1049 |
|
|
sub __2022__common ($) { |
1050 |
|
|
my $C = shift->SUPER::__2022__common; |
1051 |
|
|
$C->{bit} = 7; |
1052 |
|
|
# 0x20, 0x7F = undef |
1053 |
|
|
$C->{C0} = $Encode::ISO2022::CHARSET{C0}->{"\x7E"}; |
1054 |
|
|
$C->{G0} = $Encode::ISO2022::CHARSET{G94n}->{"\x44"}; |
1055 |
|
|
$C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1}; |
1056 |
|
|
$C->{option}->{undef_char} = ["\x22\x44", {type => 'G94n', charset => "\x44"}]; |
1057 |
|
|
## INVERTED QUESTION MARK |
1058 |
|
|
$C; |
1059 |
|
|
} |
1060 |
|
|
|
1061 |
wakaba |
1.1 |
1; |
1062 |
|
|
__END__ |
1063 |
|
|
|
1064 |
|
|
=back |
1065 |
|
|
|
1066 |
wakaba |
1.3 |
=head1 AUTHORS |
1067 |
|
|
|
1068 |
|
|
Nanashi-san |
1069 |
|
|
|
1070 |
|
|
Wakaba <w@suika.fam.cx> |
1071 |
|
|
|
1072 |
wakaba |
1.1 |
=head1 LICENSE |
1073 |
|
|
|
1074 |
wakaba |
1.3 |
Copyright 2002 Authors |
1075 |
wakaba |
1.1 |
|
1076 |
|
|
This library is free software; you can redistribute it |
1077 |
|
|
and/or modify it under the same terms as Perl itself. |
1078 |
|
|
|
1079 |
|
|
=cut |
1080 |
|
|
|
1081 |
wakaba |
1.3 |
# $Date: 2002/09/23 02:35:37 $ |
1082 |
wakaba |
1.2 |
### RFC1345.pm ends here |