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