1 If you read this file _as_is_, just ignore the funny characters you
2 see. It is written in the POD format (see perlpod manpage) which is
3 specially designed to be readable as is.
5 The following documentation is written in Big5 encoding.
7 ¦pªG§A¥Î¤@¯ëªº¤å¦r½s¿è¾¹¾\Äý³o¥÷¤å¥ó, ½Ð©¿²¤¤å¤¤©_¯Sªºµù°O¦r²Å.
8 ³o¥÷¤å¥ó¬O¥H POD (²©ú¤å¥ó®æ¦¡) ¼g¦¨; ³oºØ®æ¦¡¬O¬°¤F¯àÅý¤Hª½±µÅª¨ú,
9 ¦Ó¯S§O³]pªº. Ãö©ó¦¹®æ¦¡ªº¶i¤@¨B¸ê°T, ½Ð°Ñ¦Ò perlpod ½u¤W¤å¥ó.
15 perltw - ¥¿Å餤¤å Perl «ü«n
21 ±q 5.8.0 ª©¶}©l, Perl ¨ã³Æ¤F§¹µ½ªº Unicode (¸U°ê½X) ¤ä´©,
22 ¤]³s±a¤ä´©¤F³\¦h©Ô¤B»y¨t¥H¥~ªº½s½X¤è¦¡; CJK (¤¤¤éÁú) «K¬O¨ä¤¤ªº¤@³¡¥÷.
23 Unicode ¬O°ê»Ú©Êªº¼Ð·Ç, ¸Õ¹Ï²[»\¥@¬É¤W©Ò¦³ªº¦r²Å: ¦è¤è¥@¬É, ªF¤è¥@¬É,
24 ¥H¤Î¨âªÌ¶¡ªº¤@¤Á (§Æþ¤å, ±Ô§Q¨È¤å, ªü©Ô§B¤å, §Æ§B¨Ó¤å, ¦L«×¤å,
25 ¦L¦a¦w¤å, µ¥µ¥). ¥¦¤]®e¯Ç¤F¦hºØ§@·~¨t²Î»P¥»O (¦p PC ¤Î³Áª÷¶ð).
27 Perl ¥»¨¥H Unicode ¶i¦æ¾Þ§@. ³oªí¥Ü Perl ¤º³¡ªº¦r¦ê¸ê®Æ¥i¥Î Unicode
28 ªí¥Ü; Perl ªº¨ç¦¡»Pºâ²Å (¨Ò¦p¥¿³Wªí¥Ü¦¡¤ñ¹ï) ¤]¯à¹ï Unicode ¶i¦æ¾Þ§@.
29 ¦b¿é¤J¤Î¿é¥X®É, ¬°¤F³B²z¥H Unicode ¤§«eªº½s½X¤è¦¡Àx¦sªº¸ê®Æ, Perl
30 ´£¨Ñ¤F Encode ³oÓ¼Ò²Õ, ¥i¥HÅý§A»´©ö¦aŪ¨ú¤Î¼g¤J¦³ªº½s½X¸ê®Æ.
32 Encode ©µ¦ù¼Ò²Õ¤ä´©¤U¦C¥¿Å餤¤åªº½s½X¤è¦¡ ('big5' ªí¥Ü 'big5-eten'):
34 big5-eten Big5 ½s½X (§tʤѩµ¦ù¦r§Î)
35 big5-hkscs Big5 + »´ä¥~¦r¶°, 2001 ¦~ª©
36 cp950 ¦r½X¶ 950 (Big5 + ·L³n²K¥[ªº¦r²Å)
38 Á|¨Ò¨Ó»¡, ±N Big5 ½s½XªºÀÉ®×Âন Unicode, ¯»ÝÁä¤J¤U¦C«ü¥O:
40 perl -Mencoding=big5,STDOUT,utf8 -pe1 < file.big5 > file.utf8
42 Perl ¤]¤ºªþ¤F "piconv", ¤@¤ä§¹¥þ¥H Perl ¼g¦¨ªº¦r²ÅÂà´«¤u¨ãµ{¦¡, ¥Îªk¦p¤U:
44 piconv -f big5 -t utf8 < file.big5 > file.utf8
45 piconv -f utf8 -t big5 < file.utf8 > file.big5
47 ¥t¥~, §Q¥Î encoding ¼Ò²Õ, §A¥i¥H»´©ö¼g¥X¥H¦r²Å¬°³æ¦ìªºµ{¦¡½X, ¦p¤U©Ò¥Ü:
50 # ±Ò°Ê big5 ¦r¦ê¸ÑªR; ¼Ð·Ç¿é¥X¤J¤Î¼Ð·Ç¿ù»~³£³]¬° big5 ½s½X
51 use encoding 'big5', STDIN => 'big5', STDOUT => 'big5';
52 print length("Àd¾m"); # 2 (Âù¤Þ¸¹ªí¥Ü¦r²Å)
53 print length('Àd¾m'); # 4 (³æ¤Þ¸¹ªí¥Ü¦ì¤¸²Õ)
54 print index("½Î½Î±Ð»£", "να"); # -1 (¤£¥]§t¦¹¤l¦r¦ê)
55 print index('½Î½Î±Ð»£', 'να'); # 1 (±q²Ä¤GӦ줸²Õ¶}©l)
57 ¦b³Ì«á¤@¦C¨Ò¤l¸Ì, "½Î" ªº²Ä¤GӦ줸²Õ»P "½Î" ªº²Ä¤@Ӧ줸²Õµ²¦X¦¨ Big5
58 ½Xªº "ν"; "½Î" ªº²Ä¤GӦ줸²Õ«h»P "±Ð" ªº²Ä¤@Ӧ줸²Õµ²¦X¦¨ "α".
59 ³o¸Ñ¨M¤F¥H«e Big5 ½X¤ñ¹ï³B²z¤W±`¨£ªº°ÝÃD.
63 ¦pªG»Ýn§ó¦hªº¤¤¤å½s½X, ¥i¥H±q CPAN (L<http://www.cpan.org/>) ¤U¸ü
64 Encode::HanExtra ¼Ò²Õ. ¥¦¥Ø«e´£¨Ñ¤U¦C½s½X¤è¦¡:
66 cccii 1980 ¦~¤å«Ø·|ªº¤¤¤å¸ê°T¥æ´«½X
67 euc-tw Unix ©µ¦ù¦r²Å¶°, ¥]§t CNS11643 ¥± 1-7
68 big5plus ¤¤¤å¼Æ¦ì¤Æ§Þ³N±À¼s°òª÷·|ªº Big5+
69 big5ext ¤¤¤å¼Æ¦ì¤Æ§Þ³N±À¼s°òª÷·|ªº Big5e
71 ¥t¥~, Encode::HanConvert ¼Ò²Õ«h´£¨Ñ¤F²ÁcÂà´«¥Îªº¨âºØ½s½X:
73 big5-simp Big5 ¥¿Å餤¤å»P Unicode ²Å餤¤å¤¬Âà
74 gbk-trad GBK ²Å餤¤å»P Unicode ¥¿Å餤¤å¤¬Âà
76 Y·Q¦b GBK »P Big5 ¤§¶¡¤¬Âà, ½Ð°Ñ¦Ò¸Ó¼Ò²Õ¤ºªþªº b2g.pl »P g2b.pl ¨â¤äµ{¦¡,
77 ©Î¦bµ{¦¡¤º¨Ï¥Î¤U¦C¼gªk:
79 use Encode::HanConvert;
80 $euc_cn = big5_to_gb($big5); # ±q Big5 Âର GBK
81 $big5 = gb_to_big5($euc_cn); # ±q GBK Âର Big5
85 ½Ð°Ñ¦Ò Perl ¤ºªþªº¤j¶q»¡©ú¤å¥ó (¤£©¯¥þ¬O¥Î^¤å¼gªº), ¨Ó¾Ç²ß§ó¦hÃö©ó
86 Perl ªºª¾ÃÑ, ¥H¤Î Unicode ªº¨Ï¥Î¤è¦¡. ¤£¹L, ¥~³¡ªº¸ê·½¬Û·íÂ×´I:
88 =head2 ´£¨Ñ Perl ¸ê·½ªººô§}
92 =item L<http://www.perl.com/>
94 Perl ªºº¶ (¥Ñ¼ÚµÜ§¤½¥qºûÅ@)
96 =item L<http://www.cpan.org/>
98 Perl ºî¦X¨åÂúô (Comprehensive Perl Archive Network)
100 =item L<http://lists.perl.org/>
106 =head2 ¾Ç²ß Perl ªººô§}
110 =item L<http://www.oreilly.com.tw/product_perl.php?id=index_perl>
112 ¥¿Å餤¤åª©ªº¼ÚµÜ§ Perl ®ÑÂÇ
114 =item L<http://groups.google.com/groups?q=tw.bbs.comp.lang.perl>
116 »OÆW Perl ³s½u°Q½×°Ï (¤]´N¬O¦U¤j BBS ªº Perl ³s½uª©)
120 =head2 Perl ¨Ï¥ÎªÌ¶°·|
124 =item L<http://www.pm.org/groups/asia.html>
128 =item L<http://irc.elixus.org/>
134 =head2 Unicode ¬ÛÃöºô§}
138 =item L<http://www.unicode.org/>
140 Unicode ¾Ç³N¾Ç·| (Unicode ¼Ð·Çªº¨î©wªÌ)
142 =item L<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
144 Unix/Linux ¤Wªº UTF-8 ¤Î Unicode µª«È°Ý
152 =item ¬°¤°»ò¥s "¥¿Å餤¤å" ¤£¥s "ÁcÅ餤¤å"?
154 L<http://www.csie.ntu.edu.tw/~b7506051/mozilla/faq.html#faqglossary>
158 L<http://www.cpatch.org/>
160 =item Linux ³nÅ餤¤å¤Æp¹º
162 L<http://www.linux.org.tw/CLDP/>
168 L<Encode>, L<Encode::TW>, L<encoding>, L<perluniintro>, L<perlunicode>
172 Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
174 Audrey Tang (ð»ñ) E<lt>audreyt@audreyt.orgE<gt>