Encode::CNMap - enhanced Chinese encodings with Simplified-Traditional auto-mapping
use Encode; use Encode::CNMap; no warnings; # disable utf8 output warning my $data; $data = "ÖÐÈAÖлª"; printf "Mix [GBK] %s\n", $data; printf " -> Simp[GB] %s\n", simp_to_gb( $data ); printf " -> Trad[Big5] %s\n", simp_to_b5( $data ); printf " -> Mix [utf8] %s\n", simp_to_utf8( $data ); printf " -> Simp[utf8] %s\n", simp_to_simputf8( $data ); printf " -> Trad[utf8] %s\n", simp_to_tradutf8( $data ); $data = "¤¤µØ¤¤µØ"; printf "Trad[Big5] %s\n", $data; printf " -> Simp[GB] %s\n", trad_to_gb( $data ); printf " -> Mix [GBK] %s\n", trad_to_gbk( $data ); printf " -> Mix [utf8] %s\n", trad_to_utf8( $data ); printf " -> Simp[utf8] %s\n", trad_to_simputf8( $data ); printf " -> Trad[utf8] %s\n", trad_to_tradutf8( $data ); $data = Encode::decode("gbk", "ÖÐÈAÖлª"); printf "Mix [utf8] %s\n", $data; printf " -> Simp[GB] %s\n", utf8_to_gb( $data ); printf " -> Mix [GBK] %s\n", utf8_to_gbk( $data ); printf " -> Trad[Big5] %s\n", utf8_to_b5( $data ); printf " -> Mix [utf8] %s\n", utf8_to_utf8( $data ); printf " -> Simp[utf8] %s\n", utf8_to_simputf8( $data ); printf " -> Trad[utf8] %s\n", utf8_to_tradutf8( $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.
cnmapwx is a GUI interface to cnmap and cnmapdir. Binary distribution for Microsoft Windows can be down from http://bookbot.sourceforge.net/
Please report any requests, suggestions or bugs via http://bookbot.sourceforge.net/ http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Encode-CNMap
cnmap, cnmapdir, cnmapwx, Encode, Encode::CN, Encode::HanConvert, Encode::HanExtra
Copyright 2003-2004 Qing-Jie Zhou <qjzhou@hotmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '"ÖÐÈAÖлª";'. 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.