2 our $VERSION = do { my @r = (q$Revision: 0.95 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
7 XSLoader::load('Encode::CN',$VERSION);
9 Encode::define_alias( qr/euc.*cn$/i => '"euc-cn"' );
10 Encode::define_alias( qr/cn.*euc/i => '"euc-cn"' );
12 # Relocated from Encode.pm
13 # CP936 doesn't have vendor-addon for GBK, so they're identical.
14 Encode::define_alias( qr/^gbk$/i => '"cp936"');
20 Encode::CN - China-based Chinese Encodings
24 use Encode qw/encode decode/;
25 $euc_cn = encode("euc-cn", $utf8); # loads Encode::CN implicitly
26 $utf8 = decode("euc-cn", $euc_cn); # ditto
30 This module implements China-based Chinese charset encodings.
31 Encodings supported are as follows.
33 Canonical Alias Description
34 --------------------------------------------------------------------
35 euc-cn /euc.*cn$/i EUC (Extended Unix Character)
37 gb2312 The raw (low-bit) GB2312 character map
38 gb12345 Traditional chinese counterpart to
40 iso-ir-165 GB2312 + GB6345 + GB8565 + additions
41 cp936 Code Page 936, also known as GBK
43 hz 7-bit escaped GB2312 encoding
45 To find how to use this module in detail, see L<Encode>.
49 Due to size concerns, C<GB 18030> (an extension to C<GBK>) is distributed
50 separately on CPAN, under the name L<Encode::HanExtra>. That module
51 also contains extra Taiwan-based encodings.
55 ASCII part (0x00-0x7f) is preserved for all encodings, even though it
56 conflicts with mappings by the Unicode Consortium. See
58 F<http://www.debian.or.jp/~kubota/unicode-symbols.html.en>
60 to find why it is implemented that way.