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