Encode::CNMap ================= Enhanced Chinese encodings with Simplified-Traditional auto-mapping INSTALLATION To install this module type the following: perl Makefile.PL make make test make install enc2xs -C # optional; updates Encode.pm's on-demand loading DB DEPENDENCIES This module requires perl version 5.8.0 or later. SYNOPSIS use Encode; use Encode::CNMap; no warnings; # disable utf8 output warning my $data; $data = "中華中华"; 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", "中華中华"); 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 ); cnmap "-command" [ *inputfile* ...] > *outputfile* cnmapdir "-command" *inputdir/file* *outputdir/file* cnmap -h cnmap -s2b5 gbk.txt > big5.txt cnmap -s2gb gbk.txt > gb.txt cnmap -s2c gbk.txt > utf8.txt cnmap -s2cgb gbk.txt > utf8-cnsimp.txt cnmap -s2cb5 gbk.txt > utf8-cntrad.txt cnmap -t2gb big5.txt > gb.txt cnmap -t2gbk big5.txt > gbk.txt cnmap -t2c big5.txt > utf8.txt cnmap -t2cgb big5.txt > utf8-cnsimp.txt cnmap -t2cb5 big5.txt > utf8-cntrad.txt cnmap -u2b5 utf8.txt > big5.txt cnmap -u2gb utf8.txt > gb.txt cnmap -u2gbk utf8.txt > gbk.txt cnmap -u2cgb utf8.txt > utf8-cnsimp.txt cnmap -u2cb5 utf8.txt > utf8-cntrad.txt cnmapdir -h cnmapdir -s2b5 gbkdir big5dir cnmapdir -s2gb gbkdir gbdir cnmapdir -s2c gbkdir utf8dir cnmapdir -s2cgb gbkdir utf8-cnsimp-dir cnmapdir -s2cb5 gbkdir utf8-cntrad-dir cnmapdir -t2gb big5dir gbdir cnmapdir -t2gbk big5dir gbkdir cnmapdir -t2c big5dir utf8dir cnmapdir -t2cgb big5dir utf8-cnsimp-dir cnmapdir -t2cb5 big5dir utf8-cntrad-dir cnmapdir -u2b5 utf8dir big5dir cnmapdir -u2gb utf8dir gbdir cnmapdir -u2gbk utf8dir gbkdir cnmapdir -u2cgb utf8dir utf8-cnsimp-dir cnmapdir -u2cb5 utf8dir utf8-cntrad-dir DESCRIPTION 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. BUGS, REQUESTS, COMMENTS Please report any requests, suggestions or bugs via http://bookbot.sourceforge.net/ http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Encode-CNMap COPYRIGHT AND LICENCE Copyright 2003-2004 Qing-Jie Zhou This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.