use XSLoader;
XSLoader::load('Encode::CN',$VERSION);
-local $@;
-eval "use Encode::HanExtra"; # load extra encodings if they exist
-
1;
__END__
=head1 NAME
=head1 SYNOPSIS
- use Encode::CN;
- $euc_cn = encode("euc-cn", $utf8);
- $utf8 = encode("euc-cn", $euc_cn);
+ use Encode 'encode';
+ $euc_cn = encode("euc-cn", $utf8); # loads Encode::CN implicitly
+ $utf8 = encode("euc-cn", $euc_cn); # ditto
=head1 DESCRIPTION
separately on CPAN, under the name L<Encode::HanExtra>. That module
also contains extra Taiwan-based encodings.
-This module will automatically load L<Encode::HanExtra> if you have it on
-your machine.
-
=head1 BUGS
ASCII part (0x00-0x7f) is preserved for all encodings, even though it
'Vietnamese' => 1258,
);
-BEGIN {
- our %external_tables =
- (
- 'euc-cn' => 'Encode/CN.pm',
- gb2312 => 'Encode/CN.pm',
- gb12345 => 'Encode/CN.pm',
- gbk => 'Encode/CN.pm',
- cp936 => 'Encode/CN.pm',
- 'iso-ir-165' => 'Encode/CN.pm',
- 'euc-jp' => 'Encode/JP.pm',
- shiftjis => 'Encode/JP.pm',
- macjapan => 'Encode/JP.pm',
- cp932 => 'Encode/JP.pm',
- 'euc-kr' => 'Encode/KR.pm',
- ksc5601 => 'Encode/KR.pm',
- cp949 => 'Encode/KR.pm',
- big5 => 'Encode/TW.pm',
- 'big5-hkscs' => 'Encode/TW.pm',
- cp950 => 'Encode/TW.pm',
- );
-
- eval 'require Encode::HanExtra';
- unless ($@) {
- push %external_tables,
- (
- gb18030 => 'Encode/CN.pm', # HanExtra
- big5plus => 'Encode/TW.pm', # HanExtra
- 'euc-tw', => 'Encode/TW.pm', # HanExtra
- );
- }
-}
+our %external_tables =
+ (
+ 'euc-cn' => 'Encode/CN.pm',
+ gb2312 => 'Encode/CN.pm',
+ gb12345 => 'Encode/CN.pm',
+ gbk => 'Encode/CN.pm',
+ cp936 => 'Encode/CN.pm',
+ 'iso-ir-165' => 'Encode/CN.pm',
+ 'euc-jp' => 'Encode/JP.pm',
+ shiftjis => 'Encode/JP.pm',
+ macjapan => 'Encode/JP.pm',
+ cp932 => 'Encode/JP.pm',
+ 'euc-kr' => 'Encode/KR.pm',
+ ksc5601 => 'Encode/KR.pm',
+ cp949 => 'Encode/KR.pm',
+ big5 => 'Encode/TW.pm',
+ 'big5-hkscs' => 'Encode/TW.pm',
+ cp950 => 'Encode/TW.pm',
+ gb18030 => 'Encode/HanExtra.pm',
+ big5plus => 'Encode/HanExtra.pm',
+ 'euc-tw' => 'Encode/HanExtra.pm',
+ );
sub encodings
{
use XSLoader;
XSLoader::load('Encode::TW',$VERSION);
-local $@;
-eval "use Encode::HanExtra"; # load extra encodings if they exist
-
1;
__END__
=head1 NAME
=head1 SYNOPSIS
- use Encode::CN;
- $big5 = encode("big5", $utf8);
- $utf8 = encode("big5", $big5);
+ use Encode 'encode';
+ $big5 = encode("big5", $utf8); # loads Encode::TW implicitly
+ $utf8 = encode("big5", $big5); # ditto
=head1 DESCRIPTION
(CMEX's Big5+) are distributed separately on CPAN, under the name
L<Encode::HanExtra>. That module also contains extra China-based encodings.
-This module will automatically load L<Encode::HanExtra> if you have it on
-your machine.
-
=head1 BUGS
The C<CNS11643> encoding files are not complete (only the first two planes,