.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\" ========================================================================
.de Sh \" Subsection heading
.de Sp \" Vertical space (when we can't use .PP)
.de Vb \" Begin verbatim text
.de Ve \" End verbatim text
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
. tm Index:\\$1\t\\n%\t"\\$2"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. \" simple accents for nroff and troff
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
.\" ========================================================================
.TH PERLTW 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide"
perltw \- ¥¿Å餤¤å Perl «ü«n
±q 5.8.0 ª©¶}©l, Perl ¨ã³Æ¤F§¹µ½ªº Unicode (¸U°ê½X) ¤ä´©,
¤]³s±a¤ä´©¤F³\e¦h©Ô¤B»y¨t¥H¥~ªº½s½X¤è¦¡; \s-1CJK\s0 (¤¤¤éÁú) «K¬O¨ä¤¤ªº¤@³¡¥÷.
Unicode ¬O°ê»Ú©Êªº¼Ð·Ç, ¸Õ¹Ï²[»\e¥@¬É¤W©Ò¦³ªº¦r²Å: ¦è¤è¥@¬É, ªF¤è¥@¬É,
¥H¤Î¨âªÌ¶¡ªº¤@¤Á (§Æþ¤å, ±Ô§Q¨È¤å, ªü©Ô§B¤å, §Æ§B¨Ó¤å, ¦L«×¤å,
¦L¦a¦w¤å, µ¥µ¥). ¥¦¤]®e¯Ç¤F¦hºØ§@·~¨t²Î»P¥»O (¦p \s-1PC\s0 ¤Î³Áª÷¶ð).
Perl ¥»¨¥H Unicode ¶i¦æ¾Þ§@. ³oªí¥Ü Perl ¤º³¡ªº¦r¦ê¸ê®Æ¥i¥Î Unicode
ªí¥Ü; Perl ªº¨ç¦¡»Pºâ²Å (¨Ò¦p¥¿³Wªí¥Ü¦¡¤ñ¹ï) ¤]¯à¹ï Unicode ¶i¦æ¾Þ§@.
¦b¿é¤J¤Î¿é¥X®É, ¬°¤F³B²z¥H Unicode ¤§«eªº½s½X¤è¦¡Àx¦sªº¸ê®Æ, Perl
´£¨Ñ¤F Encode ³oÓ¼Ò²Õ, ¥i¥HÅý§A»´©ö¦aŪ¨ú¤Î¼g¤J¦³ªº½s½X¸ê®Æ.
Encode ©µ¦ù¼Ò²Õ¤ä´©¤U¦C¥¿Å餤¤åªº½s½X¤è¦¡ ('big5' ªí¥Ü 'big5\-eten'):
\& big5-eten Big5 ½s½X (§tʤѩµ¦ù¦r§Î)
\& big5-hkscs Big5 + »´ä¥~¦r¶°, 2001 ¦~ª©
\& cp950 ¦r½X¶ 950 (Big5 + ·L³n²K¥[ªº¦r²Å)
Á|¨Ò¨Ó»¡, ±N Big5 ½s½XªºÀÉ®×Âন Unicode, ¯»ÝÁä¤J¤U¦C«ü¥O:
\& perl -Mencoding=big5,STDOUT,utf8 -pe1 < file.big5 > file.utf8
Perl ¤]¤ºªþ¤F \*(L"piconv\*(R", ¤@¤ä§¹¥þ¥H Perl ¼g¦¨ªº¦r²ÅÂà´«¤u¨ãµ{¦¡, ¥Îªk¦p¤U:
\& piconv -f big5 -t utf8 < file.big5 > file.utf8
\& piconv -f utf8 -t big5 < file.utf8 > file.big5
¥t¥~, §Q¥Î encoding ¼Ò²Õ, §A¥i¥H»´©ö¼g¥X¥H¦r²Å¬°³æ¦ìªºµ{¦¡½X, ¦p¤U©Ò¥Ü:
\& # ±Ò°Ê big5 ¦r¦ê¸ÑªR; ¼Ð·Ç¿é¥X¤J¤Î¼Ð·Ç¿ù»~³£³]¬° big5 ½s½X
\& use encoding 'big5', STDIN => 'big5', STDOUT => 'big5';
\& print length("Àd¾m"); # 2 (Âù¤Þ¸¹ªí¥Ü¦r²Å)
\& print length('Àd¾m'); # 4 (³æ¤Þ¸¹ªí¥Ü¦ì¤¸²Õ)
\& print index("½Î½Î±Ð»£", "να"); # -1 (¤£¥]§t¦¹¤l¦r¦ê)
\& print index('½Î½Î±Ð»£', 'να'); # 1 (±q²Ä¤GӦ줸²Õ¶}©l)
¦b³Ì«á¤@¦C¨Ò¤l¸Ì, \*(L"½Î\*(R" ªº²Ä¤GӦ줸²Õ»P \*(L"½Î\*(R" ªº²Ä¤@Ӧ줸²Õµ²¦X¦¨ Big5
½Xªº \*(L"ν\*(R"; \*(L"½Î\*(R" ªº²Ä¤GӦ줸²Õ«h»P \*(L"±Ð\*(R" ªº²Ä¤@Ӧ줸²Õµ²¦X¦¨ \*(L"α\*(R".
³o¸Ñ¨M¤F¥H«e Big5 ½X¤ñ¹ï³B²z¤W±`¨£ªº°ÝÃD.
.IX Subsection "ÃB¥~ªº¤¤¤å½s½X"
¦pªG»Ýn§ó¦hªº¤¤¤å½s½X, ¥i¥H±q \s-1CPAN\s0 (<http://www.cpan.org/>) ¤U¸ü
Encode::HanExtra ¼Ò²Õ. ¥¦¥Ø«e´£¨Ñ¤U¦C½s½X¤è¦¡:
\& cccii 1980 ¦~¤å«Ø·|ªº¤¤¤å¸ê°T¥æ´«½X
\& euc-tw Unix ©µ¦ù¦r²Å¶°, ¥]§t CNS11643 ¥± 1-7
\& big5plus ¤¤¤å¼Æ¦ì¤Æ§Þ³N±À¼s°òª÷·|ªº Big5+
\& big5ext ¤¤¤å¼Æ¦ì¤Æ§Þ³N±À¼s°òª÷·|ªº Big5e
¥t¥~, Encode::HanConvert ¼Ò²Õ«h´£¨Ñ¤F²ÁcÂà´«¥Îªº¨âºØ½s½X:
\& big5-simp Big5 ¥¿Å餤¤å»P Unicode ²Å餤¤å¤¬Âà
\& gbk-trad GBK ²Å餤¤å»P Unicode ¥¿Å餤¤å¤¬Âà
Y·Q¦b \s-1GBK\s0 »P Big5 ¤§¶¡¤¬Âà, ½Ð°Ñ¦Ò¸Ó¼Ò²Õ¤ºªþªº b2g.pl »P g2b.pl ¨â¤äµ{¦¡,
\& use Encode::HanConvert;
\& $euc_cn = big5_to_gb($big5); # ±q Big5 Âର GBK
\& $big5 = gb_to_big5($euc_cn); # ±q GBK Âର Big5
.IX Subsection "¶i¤@¨Bªº¸ê°T"
½Ð°Ñ¦Ò Perl ¤ºªþªº¤j¶q»¡©ú¤å¥ó (¤£©¯¥þ¬O¥Î^¤å¼gªº), ¨Ó¾Ç²ß§ó¦hÃö©ó
Perl ªºª¾ÃÑ, ¥H¤Î Unicode ªº¨Ï¥Î¤è¦¡. ¤£¹L, ¥~³¡ªº¸ê·½¬Û·íÂ×´I:
.Sh "´£¨Ñ Perl ¸ê·½ªººô§}"
.IX Subsection "´£¨Ñ Perl ¸ê·½ªººô§}"
.IP "<http://www.perl.com/>" 4
.IX Item "<http://www.perl.com/>"
Perl ªºº¶ (¥Ñ¼ÚµÜ§¤½¥qºûÅ@)
.IP "<http://www.cpan.org/>" 4
.IX Item "<http://www.cpan.org/>"
Perl ºî¦X¨åÂúô (Comprehensive Perl Archive Network)
.IP "<http://lists.perl.org/>" 4
.IX Item "<http://lists.perl.org/>"
.IX Subsection "¾Ç²ß Perl ªººô§}"
.IP "<http://www.oreilly.com.tw/chinese/perl/index.html>" 4
.IX Item "<http://www.oreilly.com.tw/chinese/perl/index.html>"
¥¿Å餤¤åª©ªº¼ÚµÜ§ Perl ®ÑÂÇ
.IP "<http://groups.google.com/groups?q=tw.bbs.comp.lang.perl>" 4
.IX Item "<http://groups.google.com/groups?q=tw.bbs.comp.lang.perl>"
»OÆW Perl ³s½u°Q½×°Ï (¤]´N¬O¦U¤j \s-1BBS\s0 ªº Perl ³s½uª©)
.IX Subsection "Perl ¨Ï¥ÎªÌ¶°·|"
.IP "<http://www.pm.org/groups/asia.shtml#Taiwan>" 4
.IX Item "<http://www.pm.org/groups/asia.shtml#Taiwan>"
.IP "<http://irc.elixus.org/>" 4
.IX Item "<http://irc.elixus.org/>"
.IX Subsection "Unicode ¬ÛÃöºô§}"
.IP "<http://www.unicode.org/>" 4
.IX Item "<http://www.unicode.org/>"
Unicode ¾Ç³N¾Ç·| (Unicode ¼Ð·Çªº¨î©wªÌ)
.IP "<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>" 4
.IX Item "<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>"
Unix/Linux ¤Wªº \s-1UTF\-8\s0 ¤Î Unicode µª«È°Ý
.IX Subsection "¤¤¤å¤Æ¸ê°T"
.ie n .IP "¬°¤°»ò¥s ""¥¿Å餤¤å"" ¤£¥s ""ÁcÅ餤¤å""?" 4
.el .IP "¬°¤°»ò¥s ``¥¿Å餤¤å'' ¤£¥s ``ÁcÅ餤¤å''?" 4
.IX Item "¬°¤°»ò¥s ¥¿Å餤¤å ¤£¥s ÁcÅ餤¤å?"
<http://www.csie.ntu.edu.tw/~b7506051/mozilla/faq.html#faqglossary>
.IX Item "¤¤¤å¤Æ³nÅéÁp·ù"
.IP "Linux ³nÅ餤¤å¤Æp¹º" 4
.IX Item "Linux ³nÅ餤¤å¤Æp¹º"
<http://www.linux.org.tw/CLDP/>
Encode, Encode::TW, encoding, perluniintro, perlunicode
Jarkko Hietaniemi <jhi@iki.fi>
Autrijus Tang (ð©vº~) <autrijus@autrijus.org>