Encode::CNMap - enhanced Chinese encodings with Simplified-Traditional auto-mapping
use Encode; use Encode::CNMap; # Simplified encoding (GBK/GB) -> Big5 encoding ¤¤µØ¤¤µØ $data="ÖÐÈAÖлª"; printf "[Mixed GBK] %s", $data; printf " -> [Traditional Big5] %s\n", simp_to_b5($data); # Simplified encoding (GBK/GB) -> GB2312 encoding ÖлªÖлª $data="ÖÐÈAÖлª"; printf "[Mixed GBK] %s", $data; printf " -> [Simplified GB2312] %s\n", simp_to_gb($data); # Traditional encoding (Big5) -> GB2312 encoding ÖлªÖлª $data="¤¤µØ¤¤µØ"; printf "[Traditional Big5] %s", $data; printf " -> [Simplified GB2312] %s\n", trad_to_gb($data); # Traditional encoding (Big5) -> GBK encoding ÖÐÈAÖÐÈA $data="¤¤µØ¤¤µØ"; printf "[Traditional Big5] %s", $data; printf " -> [Mixed GBK] %s\n", trad_to_gbk($data); # Encoding with Simplified<->Traditional Auto-Converting $data=Encode::decode("gbk", "ÖÐÈAÖлª"); printf "Traditional Big5: %s\n", encode_to_b5($data); printf "Simplified GB2312: %s\n", encode_to_gb($data); printf "Mixed GBK: %s\n", encode_to_gbk($data);
This module implements China-based Chinese charset encodings. Encodings supported are as follows.
Canonical Alias Description -------------------------------------------------------------------- gb2312-simp Enhanced GB2312 simplified chinese encoding big5-trad Enhanced Big5 traditional chinese encoding --------------------------------------------------------------------
To find how to use this module in detail, see Encode.
Please report any requests, suggestions or bugs via http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Encode-CNMap
Qing-Jie Zhou <qjzhou@hotmail.com>
cnmap, cnmapdir, Encode, Encode::CN, Encode::HanConvert, Encode::HanExtra
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '¤¤µØ¤¤µØ'. Assuming CP1252
To install Encode::CNMap, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Encode::CNMap
CPAN shell
perl -MCPAN -e shell install Encode::CNMap
For more information on module installation, please visit the detailed CPAN module installation guide.