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