/[suikacvs]/perl/lib/Encode/ISO2022/ISO646.pm
Suika

Contents of /perl/lib/Encode/ISO2022/ISO646.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Mon Sep 23 10:36:03 2002 UTC (22 years, 2 months ago) by wakaba
Branch: MAIN
Changes since 1.2: +9 -3 lines
2002-09-23  Wakaba <w@suika.fam.cx>

	* ISO646.pm, RFC1345.pm: Updated.  They now
	cover akmost all ISO/IEC 2022-based charsets
	described in IETF RFC 1345.

1 wakaba 1.1 =head1 NAME
2    
3     Encode::ISO2022::ISO646 --- Encode and decode of versions of
4     ISO/IEC 646
5    
6     =head1 ENCODINGS
7    
8     =over 4
9    
10     =cut
11    
12     require 5.7.3;
13     use strict;
14     package Encode::ISO2022::ISO646;
15     use vars qw($VERSION);
16 wakaba 1.3 $VERSION=do{my @r=(q$Revision: 1.2 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
17 wakaba 1.1 use base qw(Encode::Encoding);
18     require Encode::ISO2022;
19    
20     sub encode ($$;$) {
21     my ($obj, $str, $chk) = @_;
22     $_[1] = '' if $chk;
23     $str = &Encode::ISO2022::internal_to_iso2022 ($str, $obj->__2022_encode);
24     return $str;
25     }
26    
27     sub decode ($$;$) {
28     my ($obj, $str, $chk) = @_;
29     $_[1] = '' if $chk;
30     return &Encode::ISO2022::iso2022_to_internal ($str, $obj->__2022_decode);
31     }
32    
33     sub __2022__common ($) {
34     my $C = Encode::ISO2022->new_object;
35     $C->{option}->{designate_to}->{C0}->{default} = -1;
36     $C->{option}->{designate_to}->{C1}->{default} = -1;
37     $C->{option}->{designate_to}->{G94}->{default} = -1;
38     $C->{option}->{designate_to}->{G94}->{B} = -1;
39     $C->{option}->{designate_to}->{G94n}->{default} = -1;
40     $C->{option}->{designate_to}->{G96}->{default} = -1;
41     $C->{option}->{designate_to}->{G96n}->{default} = -1;
42     $C->{G1} = $Encode::ISO2022::CHARSET{G94}->{"\x7E"}; ## empty
43     $C->{option}->{reset}->{Gdesignation} = 0;
44     $C->{option}->{reset}->{Ginvoke} = 0;
45     $C;
46     }
47     sub __2022_encode ($) {
48     my $C = shift->__2022__common;
49     $C->{GR} = undef;
50     $C;
51     }
52     sub __2022_decode ($) {
53     my $C = shift->__2022__common;
54     $C;
55     }
56    
57     package Encode::ISO2022::ISO646::ISO646basic1993;
58     use vars qw/@ISA/;
59     push @ISA, 'Encode::ISO2022::ISO646';
60     __PACKAGE__->Define (qw/ISO_646.basic:1983 ref csISO646basic1983/);
61    
62     =item ISO_646.basic:1983
63    
64     A coded character set of
65     basic code table of ISO/IEC 646 (only graphic characters, 02/00-07/14).
66     (Name: ISO_646.basic:1983 (RFC 1345), ref (RFC 1345), csISO646basic1983 (IANA))
67    
68     =cut
69    
70     sub __2022__common ($) {
71     my $C = shift->SUPER::__2022__common;
72     $C->{bit} = 7;
73     $C->{C0} = $Encode::ISO2022::CHARSET{C0}->{"\x7E"}; ## empty
74     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x21\x40"}; ## IR170
75     # 0x7E = undef
76     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x21\x40"}];
77     $C;
78     }
79    
80     package Encode::ISO2022::ISO646::INVARIANT;
81     use vars qw/@ISA/;
82     push @ISA, 'Encode::ISO2022::ISO646';
83     __PACKAGE__->Define (qw!INVARIANT csINVARIANT ISO/IEC646.BCT!);
84    
85     =item INVARIANT
86    
87     A coded character set of
88     basic code table of ISO/IEC 646 (with C0 set of ISO/IEC 6429).
89     (Name: INVARIANT (RFC 1345), csINVARIANT (IANA), ISO/IEC646.BCT)
90    
91     =cut
92    
93     sub __2022__common ($) {
94     my $C = shift->SUPER::__2022__common;
95     $C->{bit} = 7;
96     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x21\x40"}; ## IR170
97     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x21\x40"}];
98     $C;
99     }
100    
101     package Encode::ISO2022::ISO646::ISO646irv;
102     use vars qw/@ISA/;
103     push @ISA, 'Encode::ISO2022::ISO646';
104 wakaba 1.2 __PACKAGE__->Define (qw!ISO_646.irv:1983 iso-ir-2 irv csISO2IntlRefVersion ICS!);
105 wakaba 1.1
106     =item ISO_646.irv:1983
107    
108     International reference version (IRV) of ISO 646:1983.
109     (Name: ISO_646.irv:1983 (RFC 1345), iso-ir-2 (RFC 1345), irv (RFC 1345),
110 wakaba 1.2 csISO2IntlRefVersion (IANA), ICS)
111 wakaba 1.1
112     =cut
113    
114     sub __2022__common ($) {
115     my $C = shift->SUPER::__2022__common;
116     $C->{bit} = 7;
117     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x40"};
118     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
119     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x40"}];
120     $C;
121     }
122    
123     package Encode::ISO2022::ISO646::BS_4730;
124     use vars qw/@ISA/;
125     push @ISA, 'Encode::ISO2022::ISO646';
126     __PACKAGE__->Define (qw!BS_4730 iso-ir-4 ISO646-GB gb uk csISO4UnitedKingdom!);
127    
128     =item BS_4730
129    
130     BS 4730, a United Kingdom version of ISO/IEC 646.
131     (Name: BS_4730 (RFC 1345), iso-ir-4 (RFC 1345), ISO646-GB (RFC 1345),
132     gb (RFC 1345), uk (RFC 1345), csISO4UnitedKingdom (IANA))
133    
134     =cut
135    
136     sub __2022__common ($) {
137     my $C = shift->SUPER::__2022__common;
138     $C->{bit} = 7;
139     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x41"};
140     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
141     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x41"}];
142     $C;
143     }
144    
145     package Encode::ISO2022::ISO646::USASCII;
146     use vars qw/@ISA/;
147     push @ISA, 'Encode::ISO2022::ISO646';
148     #__PACKAGE__->Define (qw!ANSI_X3.4-1968 iso-ir-6 ANSI_X3.4-1986 ISO_646.irv:1991
149 wakaba 1.2 # ASCII ISO646-US US-ASCII us IBM367 cp367 csASCII
150     # 646 ASCII-7 ATF-8 CP20127 US_ASCII!);
151 wakaba 1.1
152     =item ANSI_X3.4-1968
153    
154     ANSI X3.4-1968 or ISO/IEC 646:1991 International reference version (IRV).
155     (Name: ANSI_X3.4-1968 (RFC 1345), iso-ir-6 (RFC 1345), ANSI_X3.4-1986 (RFC 1345),
156     ISO_646.irv:1991 (RFC 1345), ASCII (RFC 1345), ISO646-US (RFC 1345),
157     US-ASCII (RFC 1345), us (RFC 1345), IBM367 (RFC 1345), cp367 (RFC 1345),
158 wakaba 1.2 csASCII (IANA), 646, ASCII-7, ATF-8, CP20127 (M$), US_ASCII)
159 wakaba 1.1
160     Note that this coding system defined in this module is not used,
161     since perl standard Encode module already implement this.
162    
163     =cut
164    
165     sub __2022__common ($) {
166     my $C = shift->SUPER::__2022__common;
167     $C->{bit} = 7;
168     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x41"};
169     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
170     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x41"}];
171     $C;
172     }
173    
174     package Encode::ISO2022::ISO646::SEN_850200_B;
175     use vars qw/@ISA/;
176     push @ISA, 'Encode::ISO2022::ISO646';
177     __PACKAGE__->Define (qw!SEN_850200_B iso-ir-10 FI ISO646-FI ISO646-SE
178     csISO10Swedish!);
179    
180     =item SEN_850200_B
181    
182     SEN 850200 Appendix B, Swedish version of ISO/IEC 646.
183     (Name: SEN_850200_B (RFC 1345), iso-ir-10 (RFC 1345), FI (RFC 1345),
184     ISO646-FI (RFC 1345), ISO646-SE (RFC 1345), se (RFC 1345), csISO10Swedish (IANA))
185    
186     =cut
187    
188     sub __2022__common ($) {
189     my $C = shift->SUPER::__2022__common;
190     $C->{bit} = 7;
191     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x47"};
192     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
193     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x47"}];
194     $C;
195     }
196    
197     package Encode::ISO2022::ISO646::SEN_850200_C;
198     use vars qw/@ISA/;
199     push @ISA, 'Encode::ISO2022::ISO646';
200     __PACKAGE__->Define (qw!SEN_850200_C iso-ir-11 ISO646-SE2
201     csISO11SwedishForNames!);
202    
203     =item SEN_850200_C
204    
205     SEN 850200 Appendix C, Swedish version of ISO/IEC 646 for names.
206     (Name: SEN_850200_C (RFC 1345), iso-ir-11 (RFC 1345), ISO646-SE2 (RFC 1345),
207     csISO11SwedishForNames (IANA))
208    
209     =cut
210    
211     sub __2022__common ($) {
212     my $C = shift->SUPER::__2022__common;
213     $C->{bit} = 7;
214     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x48"};
215     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
216     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x48"}];
217     $C;
218     }
219    
220     package Encode::ISO2022::ISO646::IT;
221     use vars qw/@ISA/;
222     push @ISA, 'Encode::ISO2022::ISO646';
223     __PACKAGE__->Define (qw!IT iso-ir-15 ISO646-IT csISO15Italian!);
224    
225     =item IT
226    
227     Italic version of ISO/IEC 646.
228     (Name: IT (RFC 1345), iso-ir-15 (RFC 1345), ISO646-IT (RFC 1345),
229     csISO15Italian (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}->{"\x59"};
237     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
238     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x59"}];
239     $C;
240     }
241    
242     package Encode::ISO2022::ISO646::PT;
243     use vars qw/@ISA/;
244     push @ISA, 'Encode::ISO2022::ISO646';
245     __PACKAGE__->Define (qw!PT iso-ir-16 ISO646-PT csISO16Portuguese!);
246    
247     =item PT
248    
249     Portuguese version of ISO/IEC 646.
250     (Name: PT (RFC 1345), iso-ir-16 (RFC 1345), ISO646-PT (RFC 1345),
251     csISO16Portuguese (IANA))
252    
253     =cut
254    
255     sub __2022__common ($) {
256     my $C = shift->SUPER::__2022__common;
257     $C->{bit} = 7;
258     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x4C"};
259     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
260     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x4C"}];
261     $C;
262     }
263    
264     package Encode::ISO2022::ISO646::ES;
265     use vars qw/@ISA/;
266     push @ISA, 'Encode::ISO2022::ISO646';
267     __PACKAGE__->Define (qw!ES iso-ir-17 ISO646-ES csISO17Spanish!);
268    
269     =item ES
270    
271     Spanish version of ISO/IEC 646.
272     (Name: ES (RFC 1345), iso-ir-17 (RFC 1345), ISO646-ES (RFC 1345),
273     csISO17Spanish (IANA))
274    
275     =cut
276    
277     sub __2022__common ($) {
278     my $C = shift->SUPER::__2022__common;
279     $C->{bit} = 7;
280     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x5A"};
281     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
282     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x5A"}];
283     $C;
284     }
285    
286     package Encode::ISO2022::ISO646::DIN_66003;
287     use vars qw/@ISA/;
288     push @ISA, 'Encode::ISO2022::ISO646';
289     __PACKAGE__->Define (qw!DIN_66003 iso-ir-21 de ISO646-de csISO21German!);
290    
291     =item DIN_66003
292    
293     DIN 66003, German version of ISO/IEC 646.
294     (Name: DIN_66003 (RFC 1345), iso-ir-21 (RFC 1345), de (RFC 1345),
295     ISO646-de (RFC 1345), csISO21German (IANA))
296    
297     =cut
298    
299     sub __2022__common ($) {
300     my $C = shift->SUPER::__2022__common;
301     $C->{bit} = 7;
302     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x4B"};
303     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
304     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x4B"}];
305     $C;
306     }
307    
308     package Encode::ISO2022::ISO646::DIN_66003;
309     use vars qw/@ISA/;
310     push @ISA, 'Encode::ISO2022::ISO646';
311     __PACKAGE__->Define (qw!NF_Z_62-010_(1973) iso-ir-25 ISO646-FR1 csISO25French!);
312    
313     =item NF_Z_62-010_(1973)
314    
315     NF Z 62-010 1973, French version of ISO/IEC 646.
316     (Name: NF_Z_62-010_(1973) (RFC 1345), iso-ir-25 (RFC 1345),
317     ISO646-FR1 (RFC 1345), csISO25French (IANA))
318    
319     =cut
320    
321     sub __2022__common ($) {
322     my $C = shift->SUPER::__2022__common;
323     $C->{bit} = 7;
324     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x52"};
325     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
326     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x52"}];
327     $C;
328     }
329    
330     package Encode::ISO2022::ISO646::GB_1988;
331     use vars qw/@ISA/;
332     push @ISA, 'Encode::ISO2022::ISO646';
333     __PACKAGE__->Define (qw!GB_1988-80 iso-ir-57 cn ISO646-cn csISO57GB1988!);
334    
335     =item GB_1988-80
336    
337     GB_1988-80, Chinese version of ISO/IEC 646.
338     (Name: GB_1988-80 (RFC 1345), iso-ir-57 (RFC 1345), cn (RFC 1345),
339     ISO646-cn (RFC 1345), csISO57GB1988 (IANA))
340    
341     =cut
342    
343     sub __2022__common ($) {
344     my $C = shift->SUPER::__2022__common;
345     $C->{bit} = 7;
346     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x54"};
347     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
348     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x54"}];
349     $C;
350     }
351    
352 wakaba 1.2 package Encode::ISO2022::ISO646::csISO60DanishNorwegian;
353     use vars qw/@ISA/;
354     push @ISA, 'Encode::ISO2022::ISO646';
355     __PACKAGE__->Define (qw! NS_4551-1 iso-ir-60 ISO646-NO no csISO60DanishNorwegian
356     csISO60Norwegian1!);
357    
358     =item NS_4551-1
359    
360     NS_4551-1, Norwegian version of ISO/IEC 646.
361     (Name: NS_4551-1 (RFC 1345), iso-ir-60 (RFC 1345), ISO646-NO (RFC 1345),
362     no (RFC 1345), csISO60DanishNorwegian (IANA), csISO60Norwegian1 (IANA))
363    
364     =cut
365    
366     sub __2022__common ($) {
367     my $C = shift->SUPER::__2022__common;
368     $C->{bit} = 7;
369     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x60"};
370     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
371     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x60"}];
372     $C;
373     }
374    
375     package Encode::ISO2022::ISO646::csISO61Norwegian2;
376     use vars qw/@ISA/;
377     push @ISA, 'Encode::ISO2022::ISO646';
378     __PACKAGE__->Define (qw! NS_4551-2 iso-ir-61 ISO646-NO2 no2 csISO61Norwegian2!);
379    
380     =item NS_4551-2
381    
382     NS_4551-2, Norwegian version of ISO/IEC 646.
383     (Name: NS_4551-2 (RFC 1345), iso-ir-61 (RFC 1345), ISO646-NO2 (RFC 1345),
384     no2 (RFC 1345), csISO61Norwegian2 (IANA))
385    
386     =cut
387    
388     sub __2022__common ($) {
389     my $C = shift->SUPER::__2022__common;
390     $C->{bit} = 7;
391     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x61"};
392     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
393     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x61"}];
394     $C;
395     }
396    
397     package Encode::ISO2022::ISO646::csISO69French;
398     use vars qw/@ISA/;
399     push @ISA, 'Encode::ISO2022::ISO646';
400     __PACKAGE__->Define (qw!NF_Z_62-010 iso-ir-69 ISO646-FR fr csISO69French!);
401    
402     =item NF_Z_62-010
403    
404     NF Z 62-010, French version of ISO/IEC 646.
405     (Name: NS_4551-2 (RFC 1345), iso-ir-69 (RFC 1345), ISO646-FR (RFC 1345),
406     fr (RFC 1345), csISO69French (IANA))
407    
408     =cut
409    
410     sub __2022__common ($) {
411     my $C = shift->SUPER::__2022__common;
412     $C->{bit} = 7;
413     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x66"};
414     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
415     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x66"}];
416     $C;
417     }
418    
419     package Encode::ISO2022::ISO646::PT2;
420     use vars qw/@ISA/;
421     push @ISA, 'Encode::ISO2022::ISO646';
422     __PACKAGE__->Define (qw!PT2 iso-ir-84 ISO646-PT2 csISO84Portuguese2!);
423    
424     =item PT2
425    
426     Portuguse version of ISO/IEC 646.
427     (Name: PT2 (RFC 1345), iso-ir-84 (RFC 1345), ISO646-PT2 (RFC 1345),
428     csISO84Portuguese2 (IANA))
429    
430     =cut
431    
432     sub __2022__common ($) {
433     my $C = shift->SUPER::__2022__common;
434     $C->{bit} = 7;
435     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x67"};
436     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
437     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x67"}];
438     $C;
439     }
440    
441     package Encode::ISO2022::ISO646::ES2;
442     use vars qw/@ISA/;
443     push @ISA, 'Encode::ISO2022::ISO646';
444     __PACKAGE__->Define (qw!ES2 iso-ir-85 ISO646-ES2 csISO85Spanish2!);
445    
446     =item ES2
447    
448     Spanish version of ISO/IEC 646.
449     (Name: ES2 (RFC 1345), iso-ir-85 (RFC 1345), ISO646-ES2 (RFC 1345),
450     csISO85Spanish2 (IANA))
451    
452     =cut
453    
454     sub __2022__common ($) {
455     my $C = shift->SUPER::__2022__common;
456     $C->{bit} = 7;
457     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x68"};
458     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
459     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x68"}];
460     $C;
461     }
462    
463     package Encode::ISO2022::ISO646::csISO86Hungarian;
464     use vars qw/@ISA/;
465     push @ISA, 'Encode::ISO2022::ISO646';
466     __PACKAGE__->Define (qw!MSZ_7795.3 iso-ir-86 ISO646-HU hu csISO86Hungarian!);
467    
468     =item MSZ_7795.3
469    
470     Hungarian version of ISO/IEC 646.
471     (Name: MSZ_7795.3 (RFC 1345), iso-ir-86 (RFC 1345), ISO646-HU (RFC 1345),
472     hu (RFC 1345), csISO86Hungarian (IANA))
473    
474     =cut
475    
476     sub __2022__common ($) {
477     my $C = shift->SUPER::__2022__common;
478     $C->{bit} = 7;
479     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x69"};
480     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
481     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x69"}];
482     $C;
483     }
484    
485     package Encode::ISO2022::ISO646::csISO121Canadian1;
486     use vars qw/@ISA/;
487     push @ISA, 'Encode::ISO2022::ISO646';
488     __PACKAGE__->Define (qw!CSA_Z243.4-1985-1 iso-ir-121 ISO646-CA csa7-1 ca
489     csISO121Canadian1!);
490    
491     =item CSA_Z243.4-1985-1
492    
493     Canadian version of ISO/IEC 646.
494     (Name: CSA_Z243.4-1985-1 (RFC 1345), iso-ir-121 (RFC 1345), ISO646-CA (RFC 1345),
495     csa7-1 (RFC 1345), ca (RFC 1345), csISO121Canadian1 (IANA))
496    
497     =cut
498    
499     sub __2022__common ($) {
500     my $C = shift->SUPER::__2022__common;
501     $C->{bit} = 7;
502     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x77"};
503     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
504     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x77"}];
505     $C;
506     }
507    
508     package Encode::ISO2022::ISO646::csISO122Canadian2;
509     use vars qw/@ISA/;
510     push @ISA, 'Encode::ISO2022::ISO646';
511     __PACKAGE__->Define (qw!CSA_Z243.4-1985-2 iso-ir-122 ISO646-CA2 csa7-2
512     csISO122Canadian2!);
513    
514     =item CSA_Z243.4-1985-2
515    
516     Canadian version of ISO/IEC 646.
517     (Name: CSA_Z243.4-1985-2 (RFC 1345), iso-ir-122 (RFC 1345), ISO646-CA2 (RFC 1345),
518     csa7-2 (RFC 1345), csISO122Canadian2 (IANA))
519    
520     =cut
521    
522     sub __2022__common ($) {
523     my $C = shift->SUPER::__2022__common;
524     $C->{bit} = 7;
525     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x78"};
526     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
527     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x78"}];
528     $C;
529     }
530    
531     package Encode::ISO2022::ISO646::csISO122Canadian2;
532     use vars qw/@ISA/;
533     push @ISA, 'Encode::ISO2022::ISO646';
534     __PACKAGE__->Define (qw!JUS_I.B1.0022 iso-ir-141 ISO646-YU js yu
535     csISO141JUSIB1002!);
536    
537     =item JUS_I.B1.002
538    
539     Canadian version of ISO/IEC 646.
540     (Name: JUS_I.B1.002 (RFC 1345), iso-ir-141 (RFC 1345), ISO646-YU (RFC 1345),
541     js (RFC 1345), yu (RFC 1345), csISO141JUSIB1002 (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}->{"\x7A"};
549     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
550     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x7A"}];
551     $C;
552     }
553    
554     package Encode::ISO2022::ISO646::csISO151Cuba;
555     use vars qw/@ISA/;
556     push @ISA, 'Encode::ISO2022::ISO646';
557     __PACKAGE__->Define (qw!NC_NC00-10:81 cuba iso-ir-151ISO646-CU
558     csISO151Cuba!);
559    
560     =item NC_NC00-10:81
561    
562     Canadian version of ISO/IEC 646.
563     (Name: NC_NC00-10:81 (RFC 1345), cuba (RFC 1345), iso-ir-151 (RFC 1345),
564     ISO646-CU (RFC 1345), csISO151Cuba (IANA))
565    
566     =cut
567    
568     sub __2022__common ($) {
569     my $C = shift->SUPER::__2022__common;
570     $C->{bit} = 7;
571     $C->{G0} = $Encode::ISO2022::CHARSET{G94}->{"\x21\x41"};
572     $C->{G1} = $C->{G0}; $C->{G2} = $C->{G1}; $C->{G3} = $C->{G1};
573     $C->{option}->{undef_char} = ["\x3F", {type => 'G94', charset => "\x21\x41"}];
574     $C;
575     }
576    
577     # DS_2089 DS2089 ISO646-DK dk csISO646Danish (IANA)
578     ## Not in ISOREG
579     # KSC5636 ISO646-KR csKSC5636 (IANA)
580     ## Not in ISOREG
581 wakaba 1.1
582     1;
583     __END__
584    
585     =back
586    
587 wakaba 1.3 =head1 AUTHORS
588    
589     Nanashi-san
590    
591     Wakaba <w@suika.fam.cx>
592    
593 wakaba 1.1 =head1 LICENSE
594    
595 wakaba 1.3 Copyright 2002 Authors
596 wakaba 1.1
597     This library is free software; you can redistribute it
598     and/or modify it under the same terms as Perl itself.
599    
600     =cut
601    
602 wakaba 1.3 # $Date: 2002/09/23 02:35:37 $
603 wakaba 1.2 ### ISO646.pm ends here

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24