README
1Encode::CNMap
2=================
3Enhanced Chinese encodings with Simplified-Traditional auto-mapping
4
5INSTALLATION
6To install this module type the following:
7 perl Makefile.PL
8 make
9 make test
10 make install
11 enc2xs -C # optional; updates Encode.pm's on-demand loading DB
12
13DEPENDENCIES
14This module requires perl version 5.8.0 or later.
15
16SYNOPSIS
17 use Encode;
18 use Encode::CNMap;
19 no warnings; # disable utf8 output warning
20 my $data;
21
22 $data = "中華中华";
23 printf "Mix [GBK] %s\n", $data;
24 printf " -> Simp[GB] %s\n", simp_to_gb( $data );
25 printf " -> Trad[Big5] %s\n", simp_to_b5( $data );
26 printf " -> Mix [utf8] %s\n", simp_to_utf8( $data );
27 printf " -> Simp[utf8] %s\n", simp_to_simputf8( $data );
28 printf " -> Trad[utf8] %s\n", simp_to_tradutf8( $data );
29
30 $data = "い地い地";
31 printf "Trad[Big5] %s\n", $data;
32 printf " -> Simp[GB] %s\n", trad_to_gb( $data );
33 printf " -> Mix [GBK] %s\n", trad_to_gbk( $data );
34 printf " -> Mix [utf8] %s\n", trad_to_utf8( $data );
35 printf " -> Simp[utf8] %s\n", trad_to_simputf8( $data );
36 printf " -> Trad[utf8] %s\n", trad_to_tradutf8( $data );
37
38 $data = Encode::decode("gbk", "中華中华");
39 printf "Mix [utf8] %s\n", $data;
40 printf " -> Simp[GB] %s\n", utf8_to_gb( $data );
41 printf " -> Mix [GBK] %s\n", utf8_to_gbk( $data );
42 printf " -> Trad[Big5] %s\n", utf8_to_b5( $data );
43 printf " -> Mix [utf8] %s\n", utf8_to_utf8( $data );
44 printf " -> Simp[utf8] %s\n", utf8_to_simputf8( $data );
45 printf " -> Trad[utf8] %s\n", utf8_to_tradutf8( $data );
46
47 cnmap "-command" [ *inputfile* ...] > *outputfile*
48 cnmapdir "-command" *inputdir/file* *outputdir/file*
49
50 cnmap -h
51 cnmap -s2b5 gbk.txt > big5.txt
52 cnmap -s2gb gbk.txt > gb.txt
53 cnmap -s2c gbk.txt > utf8.txt
54 cnmap -s2cgb gbk.txt > utf8-cnsimp.txt
55 cnmap -s2cb5 gbk.txt > utf8-cntrad.txt
56 cnmap -t2gb big5.txt > gb.txt
57 cnmap -t2gbk big5.txt > gbk.txt
58 cnmap -t2c big5.txt > utf8.txt
59 cnmap -t2cgb big5.txt > utf8-cnsimp.txt
60 cnmap -t2cb5 big5.txt > utf8-cntrad.txt
61 cnmap -u2b5 utf8.txt > big5.txt
62 cnmap -u2gb utf8.txt > gb.txt
63 cnmap -u2gbk utf8.txt > gbk.txt
64 cnmap -u2cgb utf8.txt > utf8-cnsimp.txt
65 cnmap -u2cb5 utf8.txt > utf8-cntrad.txt
66 cat gbk.txt | cnmap -s2gb | more
67
68 cnmapdir -h
69 cnmapdir -s2b5 gbkdir big5dir
70 cnmapdir -s2gb gbkdir gbdir
71 cnmapdir -s2c gbkdir utf8dir
72 cnmapdir -s2cgb gbkdir utf8-cnsimp-dir
73 cnmapdir -s2cb5 gbkdir utf8-cntrad-dir
74 cnmapdir -t2gb big5dir gbdir
75 cnmapdir -t2gbk big5dir gbkdir
76 cnmapdir -t2c big5dir utf8dir
77 cnmapdir -t2cgb big5dir utf8-cnsimp-dir
78 cnmapdir -t2cb5 big5dir utf8-cntrad-dir
79 cnmapdir -u2b5 utf8dir big5dir
80 cnmapdir -u2gb utf8dir gbdir
81 cnmapdir -u2gbk utf8dir gbkdir
82 cnmapdir -u2cgb utf8dir utf8-cnsimp-dir
83 cnmapdir -u2cb5 utf8dir utf8-cntrad-dir
84
85DESCRIPTION
86 This module implements China-based Chinese charset encodings.
87 Encodings supported are as follows.
88
89 Canonical Alias Description
90 -------------------------------------------------------------------
91 gb2312-simp Enhanced GB2312 simplified chinese encoding
92 big5-trad Enhanced Big5 traditional chinese encoding
93 -------------------------------------------------------------------
94
95 To find how to use this module in detail, see Encode.
96
97 cnmapwx is a GUI interface to cnmap and cnmapdir. Binary distribution
98 for Microsoft Windows can be down from http://bookbot.sourceforge.net/
99
100BUGS, REQUESTS, COMMENTS
101 Please report any requests, suggestions or bugs via
102 http://bookbot.sourceforge.net/
103 http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Encode-CNMap
104
105COPYRIGHT AND LICENCE
106 Copyright 2003-2004 Qing-Jie Zhou <qjzhou@hotmail.com>
107 This library is free software; you can redistribute it and/or modify it
108 under the same terms as Perl itself.