4 die "Encode::CN not supported on EBCDIC\n";
7 our $VERSION = do { my @r = (q$Revision: 1.22 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
11 XSLoader::load(__PACKAGE__,$VERSION);
13 # Relocated from Encode.pm
16 # use Encode::CN::2022_CN;
23 Encode::CN - China-based Chinese Encodings
27 use Encode qw/encode decode/;
28 $euc_cn = encode("euc-cn", $utf8); # loads Encode::CN implicitly
29 $utf8 = decode("euc-cn", $euc_cn); # ditto
33 This module implements China-based Chinese charset encodings.
34 Encodings supported are as follows.
36 Canonical Alias Description
37 --------------------------------------------------------------------
38 euc-cn /\beuc.*cn$/i EUC (Extended Unix Character)
40 /\bGB[-_ ]?2312(?:\D.*$|$)/i (see below)
41 gb2312-raw The raw (low-bit) GB2312 character map
42 gb12345-raw Traditional chinese counterpart to
44 iso-ir-165 GB2312 + GB6345 + GB8565 + additions
45 MacChineseSimp GB2312 + Apple Additions
46 cp936 Code Page 936, also known as GBK
48 hz 7-bit escaped GB2312 encoding
49 --------------------------------------------------------------------
51 To find how to use this module in detail, see L<Encode>.
55 Due to size concerns, C<GB 18030> (an extension to C<GBK>) is distributed
56 separately on CPAN, under the name L<Encode::HanExtra>. That module
57 also contains extra Taiwan-based encodings.
61 When you see C<charset=gb2312> on mails and web pages, they really
62 mean "euc-cn" encodings. To fix that, gb2312 is aliased to euc-cn. Use
63 gb2312-raw when you really mean it.
65 ASCII part (0x00-0x7f) is preserved for all encodings, even though it
66 conflicts with mappings by the Unicode Consortium. See
68 L<http://www.debian.or.jp/~kubota/unicode-symbols.html.en>
70 to find why it is implemented that way.
74 L<Encode>,L<Encode::CJKguide>