1package Encode::CN; 2BEGIN { 3 if ( ord("A") == 193 ) { 4 die "Encode::CN not supported on EBCDIC\n"; 5 } 6} 7use strict; 8use warnings; 9use Encode; 10our $VERSION = do { my @r = ( q$Revision: 2.3 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; 11use XSLoader; 12XSLoader::load( __PACKAGE__, $VERSION ); 13 14# Relocated from Encode.pm 15 16use Encode::CN::HZ; 17 18# use Encode::CN::2022_CN; 19 201; 21__END__ 22 23=head1 NAME 24 25Encode::CN - China-based Chinese Encodings 26 27=head1 SYNOPSIS 28 29 use Encode qw/encode decode/; 30 $euc_cn = encode("euc-cn", $utf8); # loads Encode::CN implicitly 31 $utf8 = decode("euc-cn", $euc_cn); # ditto 32 33=head1 DESCRIPTION 34 35This module implements China-based Chinese charset encodings. 36Encodings supported are as follows. 37 38 Canonical Alias Description 39 -------------------------------------------------------------------- 40 euc-cn /\beuc.*cn$/i EUC (Extended Unix Character) 41 /\bcn.*euc$/i 42 /\bGB[-_ ]?2312(?:\D.*$|$)/i (see below) 43 gb2312-raw The raw (low-bit) GB2312 character map 44 gb12345-raw Traditional chinese counterpart to 45 GB2312 (raw) 46 iso-ir-165 GB2312 + GB6345 + GB8565 + additions 47 MacChineseSimp GB2312 + Apple Additions 48 cp936 Code Page 936, also known as GBK 49 (Extended GuoBiao) 50 hz 7-bit escaped GB2312 encoding 51 -------------------------------------------------------------------- 52 53To find how to use this module in detail, see L<Encode>. 54 55=head1 NOTES 56 57Due to size concerns, C<GB 18030> (an extension to C<GBK>) is distributed 58separately on CPAN, under the name L<Encode::HanExtra>. That module 59also contains extra Taiwan-based encodings. 60 61=head1 BUGS 62 63When you see C<charset=gb2312> on mails and web pages, they really 64mean C<euc-cn> encodings. To fix that, C<gb2312> is aliased to C<euc-cn>. 65Use C<gb2312-raw> when you really mean it. 66 67The ASCII region (0x00-0x7f) is preserved for all encodings, even though 68this conflicts with mappings by the Unicode Consortium. 69 70=head1 SEE ALSO 71 72L<Encode> 73 74=cut 75