| 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 ($$;$) { |
| 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 |
|
|
| 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 |
} |
} |
| 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 |
|
|
| 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; |
| 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 |
| 124 |
package Encode::ISO2022::SevenBit::JP1; |
package Encode::ISO2022::SevenBit::JP1; |
| 125 |
use vars qw/@ISA/; |
use vars qw/@ISA/; |
| 126 |
push @ISA, 'Encode::ISO2022::SevenBit::JP'; |
push @ISA, 'Encode::ISO2022::SevenBit::JP'; |
| 127 |
__PACKAGE__->Define (qw/iso-2022-jp-1/); |
__PACKAGE__->Define (qw/iso-2022-jp-1 iso2022jp-1/); |
| 128 |
|
|
| 129 |
=item iso-2022-jp-1 |
=item iso-2022-jp-1 |
| 130 |
|
|
| 131 |
ISO/IEC 2022 based 7-bit encoding for Japanese, |
ISO/IEC 2022 based 7-bit encoding for Japanese, |
| 132 |
defined by RFC 2237 |
defined by RFC 2237. (Alias: iso2022jp-1) |
| 133 |
|
|
| 134 |
=cut |
=cut |
| 135 |
|
|
| 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 iso2022jp-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, iso2022jp-3, jis0213) |
| 154 |
|
|
| 155 |
=item iso-2022-jp-3-compatible |
=item iso-2022-jp-3-compatible |
| 156 |
|
|
| 216 |
package Encode::ISO2022::SevenBit::JP2; |
package Encode::ISO2022::SevenBit::JP2; |
| 217 |
use vars qw/@ISA/; |
use vars qw/@ISA/; |
| 218 |
push @ISA, 'Encode::ISO2022::SevenBit::SS2'; |
push @ISA, 'Encode::ISO2022::SevenBit::SS2'; |
| 219 |
__PACKAGE__->Define (qw/iso-2022-jp-2 csiso2022jp2/); |
__PACKAGE__->Define (qw/iso-2022-jp-2 csiso2022jp2 iso2022jp-2/); |
| 220 |
|
|
| 221 |
=item iso-2022-jp-2 |
=item iso-2022-jp-2 |
| 222 |
|
|
| 223 |
ISO/IEC 2022 based 7-bit multilingual encoding, defined by |
ISO/IEC 2022 based 7-bit multilingual encoding, defined by |
| 224 |
RFC 1554. A subset of iso-2022-7bit-ss2. (Alias: csISO2022JP2 (IANA)) |
RFC 1554. A subset of iso-2022-7bit-ss2. (Alias: iso2022jp-2, |
| 225 |
|
csISO2022JP2 (IANA)) |
| 226 |
|
|
| 227 |
=cut |
=cut |
| 228 |
|
|
| 248 |
} |
} |
| 249 |
sub __2022_encode ($) { |
sub __2022_encode ($) { |
| 250 |
my $C = shift->__2022__common; |
my $C = shift->__2022__common; |
| 251 |
|
$C->{GR} = undef; |
| 252 |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
| 253 |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
| 254 |
$C; |
$C; |
| 294 |
} |
} |
| 295 |
sub __2022_encode ($) { |
sub __2022_encode ($) { |
| 296 |
my $C = shift->__2022__common; |
my $C = shift->__2022__common; |
| 297 |
|
$C->{GR} = undef; |
| 298 |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
| 299 |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
| 300 |
$C; |
$C; |
| 332 |
} |
} |
| 333 |
sub __2022_encode ($) { |
sub __2022_encode ($) { |
| 334 |
my $C = shift->__2022__common; |
my $C = shift->__2022__common; |
| 335 |
|
$C->{GR} = undef; |
| 336 |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
| 337 |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
| 338 |
$C; |
$C; |
| 376 |
} |
} |
| 377 |
sub __2022_encode ($) { |
sub __2022_encode ($) { |
| 378 |
my $C = shift->__2022__common; |
my $C = shift->__2022__common; |
| 379 |
|
$C->{GR} = undef; |
| 380 |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
| 381 |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
| 382 |
$C; |
$C; |
| 454 |
} |
} |
| 455 |
sub __2022_encode ($) { |
sub __2022_encode ($) { |
| 456 |
my $C = shift->__2022__common; |
my $C = shift->__2022__common; |
| 457 |
|
$C->{GR} = undef; |
| 458 |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
$C->{C1} = $Encode::ISO2022::CHARSET{C1}->{"\x7E"}; ## empty set |
| 459 |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
$C->{G1} = $Encode::ISO2022::CHARSET{G96}->{"\x7E"}; ## empty set |
| 460 |
$C; |
$C; |
| 504 |
|
|
| 505 |
=head1 LICENSE |
=head1 LICENSE |
| 506 |
|
|
| 507 |
Copyright 2002 wakaba <w@suika.fam.cx> |
Copyright 2002 Wakaba <w@suika.fam.cx> |
| 508 |
|
|
| 509 |
This library is free software; you can redistribute it |
This library is free software; you can redistribute it |
| 510 |
and/or modify it under the same terms as Perl itself. |
and/or modify it under the same terms as Perl itself. |