/[pub]/test/oldencodeutils/lib/Encode/ISO2022/SevenBit.pm
Suika

Diff of /test/oldencodeutils/lib/Encode/ISO2022/SevenBit.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wakaba, Mon Sep 16 02:17:48 2002 UTC revision 1.7 by wakaba, Mon Sep 23 10:36:03 2002 UTC
# Line 15  package Encode::ISO2022::SevenBit; Line 15  package Encode::ISO2022::SevenBit;
15  use vars qw($VERSION);  use vars qw($VERSION);
16  $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};  $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
17  use base qw(Encode::Encoding);  use base qw(Encode::Encoding);
18  __PACKAGE__->Define (qw/iso-2022-7bit iso-2022-7 jis junet jis7/);  __PACKAGE__->Define (qw/iso-2022-7bit iso-2022-7 jis junet jis7
19      7bit-jis/);
20  require Encode::ISO2022;  require Encode::ISO2022;
21    
22  sub encode ($$;$) {  sub encode ($$;$) {
# Line 34  sub decode ($$;$) { Line 35  sub decode ($$;$) {
35  =item iso-2022-7bit  =item iso-2022-7bit
36    
37  ISO/IEC 2022 based 7-bit encoding using only G0  ISO/IEC 2022 based 7-bit encoding using only G0
38  (Alias: junet, jis, jis7, iso-2022-7)  (Alias: junet (emacsen), jis, jis7, iso-2022-7 (emacsen), 7bit-jis (perl))
39    
40  =cut  =cut
41    
# Line 47  sub __2022__common ($) { Line 48  sub __2022__common ($) {
48  }  }
49  sub __2022_encode ($) {  sub __2022_encode ($) {
50    my $C = shift->__2022__common;    my $C = shift->__2022__common;
51      $C->{GR} = undef;
52    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set
53    $C;    $C;
54  }  }
# Line 60  package Encode::ISO2022::SevenBit::JP; Line 62  package Encode::ISO2022::SevenBit::JP;
62  use vars qw/@ISA/;  use vars qw/@ISA/;
63  push @ISA, 'Encode::ISO2022::SevenBit';  push @ISA, 'Encode::ISO2022::SevenBit';
64  __PACKAGE__->Define (qw/iso-2022-jp junet-code japanese-iso-7bit csiso2022jp  __PACKAGE__->Define (qw/iso-2022-jp junet-code japanese-iso-7bit csiso2022jp
65   cp50220 iso2022jp/);   iso2022jp/);
66    
67  =item iso-2022-jp  =item iso-2022-jp
68    
69  ISO/IEC 2022 based 7-bit encoding for Japanese.  ISO/IEC 2022 based 7-bit encoding for Japanese.
70  Defined by Junet no tebiki, RFC 1468 and JIS X 0208:1997 Appendix 2.  Defined by Junet no tebiki, RFC 1468 and JIS X 0208:1997 Appendix 2.
71  (Alias: junet-code, japanese-iso-7bit (emacsen), csISO2022JP (IANA),  (Alias: junet-code, japanese-iso-7bit (emacsen), csISO2022JP (IANA))
 CP50220 (M$))  
72    
73  =cut  =cut
74    
# Line 90  sub __2022__common ($) { Line 91  sub __2022__common ($) {
91  }  }
92  sub __2022_encode ($) {  sub __2022_encode ($) {
93    my $C = shift->__2022__common;    my $C = shift->__2022__common;
94      $C->{GR} = undef;
95    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set
96    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set
97    $C;    $C;
# Line 99  package Encode::ISO2022::SevenBit::JP197 Line 101  package Encode::ISO2022::SevenBit::JP197
101  use vars qw/@ISA/;  use vars qw/@ISA/;
102  push @ISA, 'Encode::ISO2022::SevenBit::JP';  push @ISA, 'Encode::ISO2022::SevenBit::JP';
103  __PACKAGE__->Define (qw/iso-2022-jp-1978-irv japanese-iso-7bit-1978-irv old-jis  __PACKAGE__->Define (qw/iso-2022-jp-1978-irv japanese-iso-7bit-1978-irv old-jis
104    x-obsoleted-iso-2022-jp/);    x-obsoleted-iso-2022-jp jis78/);
105    
106  =item iso-2022-jp-1978-irv  =item iso-2022-jp-1978-irv
107    
108  ISO/IEC 2022 based 7-bit encoding for Japanese.  ISO/IEC 2022 based 7-bit encoding for Japanese,
109  (Alias: japanese-iso-7bit-1978-irv (emacsen), old-jis (emacsen))  using JIS X 0208-1978.
110    (Alias: japanese-iso-7bit-1978-irv (emacsen), old-jis (emacsen),
111    jis78)
112    
113  =cut  =cut
114    
115  sub __2022_encode ($) {  sub __2022_encode ($) {
116    my $C = shift->__2022__common;    my $C = shift->__2022__common;
117      $C->{GR} = undef;
118    $C->{option}->{designate_to}->{G94}->{"\x4A"} = -1;   ## JIS X 0201 roman    $C->{option}->{designate_to}->{G94}->{"\x4A"} = -1;   ## JIS X 0201 roman
119    $C->{option}->{designate_to}->{G94n}->{"\x42"} = -1;  ## JIS X 0208-1983    $C->{option}->{designate_to}->{G94n}->{"\x42"} = -1;  ## JIS X 0208-1983
120    $C->{option}->{designate_to}->{G94n}->{"\x42\x40"} = -1;      ## JIS X 0208-1990    $C->{option}->{designate_to}->{G94n}->{"\x42\x40"} = -1;      ## JIS X 0208-1990
# Line 138  sub __2022__common ($) { Line 143  sub __2022__common ($) {
143  package Encode::ISO2022::SevenBit::JP3;  package Encode::ISO2022::SevenBit::JP3;
144  use vars qw/@ISA/;  use vars qw/@ISA/;
145  push @ISA, 'Encode::ISO2022::SevenBit::JP';  push @ISA, 'Encode::ISO2022::SevenBit::JP';
146  __PACKAGE__->Define (qw/iso-2022-jp-3 x-iso-2022-jp-3   iso-2022-jp-3-compatible iso-2022-jp-3-strict/);  __PACKAGE__->Define (qw/iso-2022-jp-3 x-iso-2022-jp-3
147     jis0213   iso-2022-jp-3-compatible iso-2022-jp-3-strict/);
148    
149  =item iso-2022-jp-3  =item iso-2022-jp-3
150    
151  ISO/IEC 2022 based 7-bit encoding for Japanese,  ISO/IEC 2022 based 7-bit encoding for Japanese,
152  defined by JIS X 0213:2000 Appendix 2.  defined by JIS X 0213:2000 Appendix 2.
153  (Alias: x-iso-2022-jp-3)  (Alias: x-iso-2022-jp-3, jis0213)
154    
155  =item iso-2022-jp-3-compatible  =item iso-2022-jp-3-compatible
156    
# Line 241  sub __2022__common ($) { Line 247  sub __2022__common ($) {
247  }  }
248  sub __2022_encode ($) {  sub __2022_encode ($) {
249    my $C = shift->__2022__common;    my $C = shift->__2022__common;
250      $C->{GR} = undef;
251    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set
252    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set
253    $C;    $C;
# Line 286  sub __2022__common ($) { Line 293  sub __2022__common ($) {
293  }  }
294  sub __2022_encode ($) {  sub __2022_encode ($) {
295    my $C = shift->__2022__common;    my $C = shift->__2022__common;
296      $C->{GR} = undef;
297    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set
298    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set
299    $C;    $C;
# Line 323  sub __2022__common ($) { Line 331  sub __2022__common ($) {
331  }  }
332  sub __2022_encode ($) {  sub __2022_encode ($) {
333    my $C = shift->__2022__common;    my $C = shift->__2022__common;
334      $C->{GR} = undef;
335    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set
336    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set
337    $C;    $C;
# Line 366  sub __2022__common ($) { Line 375  sub __2022__common ($) {
375  }  }
376  sub __2022_encode ($) {  sub __2022_encode ($) {
377    my $C = shift->__2022__common;    my $C = shift->__2022__common;
378      $C->{GR} = undef;
379    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set
380    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set
381    $C;    $C;
# Line 443  sub __2022__common ($) { Line 453  sub __2022__common ($) {
453  }  }
454  sub __2022_encode ($) {  sub __2022_encode ($) {
455    my $C = shift->__2022__common;    my $C = shift->__2022__common;
456      $C->{GR} = undef;
457    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set    $C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"};   ## empty set
458    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set    $C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"};  ## empty set
459    $C;    $C;
# Line 492  __END__ Line 503  __END__
503    
504  =head1 LICENSE  =head1 LICENSE
505    
506  Copyright 2002 wakaba <w@suika.fam.cx>  Copyright 2002 Wakaba <w@suika.fam.cx>
507    
508  This library is free software; you can redistribute it  This library is free software; you can redistribute it
509  and/or modify it under the same terms as Perl itself.  and/or modify it under the same terms as Perl itself.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.7

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24