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 euc-jp encoding.
9 perljp - ÆüËܸì Perl ¥¬¥¤¥É
13 Perl ¤ÎÀ¤³¦¤Ø¤è¤¦¤³¤½!
15 Perl 5.8.0 ¤è¤ê¡¢Unicode¥µ¥Ý¡¼¥È¤¬ÂçÉý¤Ë¶¯²½¤µ¤ì¡¢¤½¤Î·ë²Ì¥é¥Æ¥óʸ»ú°Ê³°¤Îʸ»ú¥³¡¼¥É¤Î¥µ¥Ý¡¼¥È¤¬ CJK (Ãæ¹ñ¸ì¡¢ÆüËܸ졢¥Ï¥ó¥°¥ë)¤ò´Þ¤á¤Æ²Ã¤ï¤ê¤Þ¤·¤¿¡£Unicode¤ÏÀ¤³¦Ãæ¤Îʸ»ú¤ò°ì¤Ä¤Îʸ»ú¥³¡¼¥É¤Ç°·¤¦¤³¤È¤òÌܻؤ·¤¿É¸½àµ¬³Ê¤Ç¤¢¤ê¡¢Å줫¤éÀ¾¡¢¤Ï¤¿¤Þ¤¿¤½¤Î´Ö¤Îʸ»ú¡Ê¥®¥ê¥·¥ãʸ»ú¡¢¥¥ê¡¼¥ëʸ»ú¡¢¥¢¥é¥Ó¥¢Ê¸»ú¡¢¥Ø¥Ö¥é¥¤Ê¸»ú¡¢¥Ç¥£¡¼¥ô¥¡¥Ê¥¬¡¼¥êʸ»ú¡¢¤Ê¤É¤Ê¤É¡Ë¤ä¡¢¤³¤ì¤Þ¤Ç¤ÏOS¥Ù¥ó¥À¡¼¤¬Æȼ«¤ËÄê¤á¤Æ¤¤¤¿Ê¸»ú(PC¤ª¤è¤ÓMacintosh)¤¬¤¹¤Ç¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
17 Perl ¼«¿È¤Ï Unicode ¤ÇÆ°ºî¤·¤Þ¤¹¡£Perl ¥¹¥¯¥ê¥×¥ÈÆâ¤Îʸ»úÎó¥ê¥Æ¥é¥ë¤äÀµµ¬É½¸½¤Ï Unicode ¤òÁ°Äó¤È¤·¤Æ¤¤¤Þ¤¹¡£¤½¤·¤ÆÆþ½ÐÎϤΤ¿¤á¤Ë¤Ï¡¢¤³¤ì¤Þ¤Ç»È¤ï¤ì¤Æ¤¤¿¤µ¤Þ¤¶¤Þ¤Êʸ»ú¥³¡¼¥É¤ËÂбþ¤¹¤ë¥â¥¸¥å¡¼¥ë¡¢¡Ö Encode ¡×¤¬É¸½àÁõÈ÷¤µ¤ì¤Æ¤ª¤ê¡¢Unicode ¤È¤³¤ì¤é¤Îʸ»ú¥³¡¼¥É¤ÎÁê¸ßÊÑ´¹¤â´Êñ¤Ë¹Ô¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
19 ¸½»þÅÀ¤Ç Encode ¤¬¥µ¥Ý¡¼¥È¤¹¤ëʸ»ú¥³¡¼¥É¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£
21 7bit-jis AdobeStandardEncoding AdobeSymbol AdobeZdingbat
22 ascii big5 big5-hkscs cp1006
23 cp1026 cp1047 cp1250 cp1251
24 cp1252 cp1253 cp1254 cp1255
25 cp1256 cp1257 cp1258 cp37
26 cp424 cp437 cp500 cp737
27 cp775 cp850 cp852 cp855
28 cp856 cp857 cp860 cp861
29 cp862 cp863 cp864 cp865
30 cp866 cp869 cp874 cp875
31 cp932 cp936 cp949 cp950
32 dingbats euc-cn euc-jp euc-kr
33 gb12345-raw gb2312-raw gsm0338 hp-roman8
34 hz iso-2022-jp iso-2022-jp-1 iso-8859-1
35 iso-8859-10 iso-8859-11 iso-8859-13 iso-8859-14
36 iso-8859-15 iso-8859-16 iso-8859-2 iso-8859-3
37 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7
38 iso-8859-8 iso-8859-9 iso-ir-165 jis0201-raw
39 jis0208-raw jis0212-raw johab koi8-f
40 koi8-r koi8-u ksc5601-raw MacArabic
41 MacCentralEurRoman MacChineseSimp MacChineseTrad MacCroatian
42 MacCyrillic MacDingbats MacFarsi MacGreek
43 MacHebrew MacIcelandic MacJapanese MacKorean
44 MacRoman MacRomanian MacRumanian MacSami
45 MacSymbol MacThai MacTurkish MacUkrainian
46 nextstep posix-bc shiftjis symbol
47 UCS-2BE UCS-2LE UTF-16 UTF-16BE
48 UTF-16LE UTF-32 UTF-32BE UTF-32LE
53 Î㤨¤Ð¡¢Ê¸»ú¥³¡¼¥ÉFOO¤Î¥Õ¥¡¥¤¥ë¤òUTF-8¤ËÊÑ´¹¤¹¤ë¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£
55 perl -Mencoding=FOO,STDOUT,utf8 -pe1 < file.FOO > file.utf8
57 ¤Þ¤¿¡¢Perl¤Ë¤Ï¡¢Á´Éô¤¬Perl¤Ç½ñ¤«¤ì¤¿Ê¸»ú¥³¡¼¥ÉÊÑ´¹¥æ¡¼¥Æ¥£¥ê¥Æ¥£¡¢piconv¤âÉÕ°¤·¤Æ¤¤¤ë¤Î¤Ç¡¢°Ê²¼¤Î¤è¤¦¤Ë¤¹¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£
59 piconv -f FOO -t utf8 < file.FOO > file.utf8
60 piconv -f utf8 -t FOO < file.utf8 > file.FOO
62 =head2 About (jcode.pl|Jcode.pm|JPerl)
64 5.8°ÊÁ°¤Î¡¢¥¹¥¯¥ê¥×¥È¤¬EUC-JP¤Ç¤¢¤ì¤Ð¥ê¥Æ¥é¥ë¤À¤±¤Ï°·¤¦¤³¤È¤¬¤Ç¤¤Þ¤·¤¿¡£¤Þ¤¿¡¢Æþ½ÐÎϤò°·¤¦¥â¥¸¥å¡¼¥ë¤È¤·¤Æ¤ÏJcode.pm¤¬( http://openlab.jp/Jcode/ )¡¢perl4ÍѤΥ桼¥Æ¥£¥ê¥Æ¥£¤È¤·¤Æ¤Ïjcode.pl( http://srekcah.org/jcode/ )¤¬¤½¤ì¤¾¤ì¸ºß¤·¡¢ÆüËܸì¤Î°·¤¨¤ëCGI¤Ç¤è¤¯ÍøÍѤµ¤ì¤Æ¤¤¤ë¤³¤È¤ò¸æ¸¤¸¤ÎÊý¤â¾¯¤Ê¤¯¤Ê¤¤¤«¤È»×¤ï¤ì¤Þ¤¹¡£¤¿¤À¤·¡¢ÆüËܸì¤Ë¤è¤ëÀµµ¬É½¸½¤ò¤¦¤Þ¤¯°·¤¦¤³¤È¤ÏÉÔ²Äǽ¤Ç¤·¤¿¡£
66 5.005°ÊÁ°¤ÎPerl¤Ë¤Ï¡¢ÆüËܸì¤ËÆò½¤·¤¿¥í¡¼¥«¥é¥¤¥ºÈÇ¡¢Jperl¤¬Â¸ºß¤·¤Þ¤·¤¿( http://homepage2.nifty.com/kipp/perl/jperl/index.html )¡£¤Þ¤¿¡¢Mac OS 9.x/ClassicÍѤÎPerl¡¢MacPerl¤ÎÆüËܸìÈǤâMacJPerl¤È¤·¤Æ¸ºß¤·¤Æ¤Þ¤·¤¿¡£( http://world.std.com/~habilis/macjperl/ ).¤³¤ì¤é¤Ç¤Ïʸ»ú¥³¡¼¥É¤È¤·¤ÆEUC-JP¤Ë²Ã¤¨Shift_JIS¤â¤½¤Î¤Þ¤Þ°·¤¦¤³¤È¤¬¤Ç¤¡¢¤Þ¤¿ÆüËܸì¤Ë¤è¤ëÀµµ¬É½¸½¤ò°·¤¦¤³¤È¤â²Äǽ¤Ç¤·¤¿¡£
68 Perl5.8¤Ç¤Ï¡¢¤³¤ì¤é¤Îµ¡Ç½¤¬¤¹¤Ù¤ÆPerlËÜÂΤÀ¤±¤Ç¼Â¸½¤Ç¤¤ë¾å¤Ë¡¢ÆüËܸì¤Î¤ß¤Ê¤é¤º¾åµ114¤Îʸ»ú¥³¡¼¥É¤ò¤¹¤Ù¤Æ¡¢¤·¤«¤âƱ»þ¤Ë°·¤¦¤³¤È¤¬¤Ç¤¤Þ¤¹¡£¤µ¤é¤Ë¡¢CPAN¤Ê¤É¤«¤é¿·¤·¤¤Ê¸»ú¥³¡¼¥ÉÍѤΥ⥸¥å¡¼¥ë¤òÆþ¼ê¤¹¤ë¤³¤È¤â´Êñ¤Ë¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
76 °Ê²¼¤ÎÎã¤Ï¤¤¤Å¤ì¤âShift_JIS¤ÎÆþÎϤòEUC-JP¤ËÊÑ´¹¤·¤Æ½ÐÎϤ·¤Þ¤¹¡£
81 jcode::convert(*_, 'euc', 'sjis');
87 print Jcode->new($_, 'sjis')->euc;
92 from_to($_, 'shiftjis', 'euc-jp');
95 # Perl 5.8 - encoding ¤òÍøÍѤ·¤Æ
96 use encoding 'euc-jp', STDIN => 'shiftjis';
105 ¤¤¤ï¤æ¤ë"shebang"¤òÊѹ¹¤¹¤ë¤À¤±¤Ç¡¢JperlÍѤÎscript¤Î¤Û¤È¤ó¤É¤ÏÊѹ¹¤Ê¤·¤ËÍøÍѲÄǽ¤À¤È»×¤ï¤ì¤Þ¤¹¡£
109 #!/path/to/perl -Mencoding=euc-jp
111 ¾Ü¤·¤¯¤Ï perldoc encoding ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
117 Perl¤Ë¤ÏËÄÂç¤Ê»ñÎÁ¤¬ÉÕ°¤·¤Æ¤ª¤ê¡¢Perl¤Î¿·µ¡Ç½¤äUnicode¥µ¥Ý¡¼¥È¡¢¤½¤·¤ÆEncode¥â¥¸¥å¡¼¥ë¤Î»ÈÍÑË¡¤Ê¤É¤¬ºÙ¤«¤¯ÌÖÍ夵¤ì¤Æ¤¤¤Þ¤¹¡Ê»ÄÇ°¤Ê¤¬¤é¡¢¤Û¤È¤ó¤É±Ñ¸ì¤Ç¤Ï¤¢¤ê¤Þ¤¹¤¬¡Ë¡£°Ê²¼¤Î¥³¥Þ¥ó¥É¤Ç¤½¤ì¤é¤Î°ìÉô¤ò±ÜÍ÷¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£
119 perldoc perlunicode # Perl¤ÎUnicode¥µ¥Ý¡¼¥ÈÁ´ÈÌ
120 perldoc Encode # Encode¥â¥¸¥å¡¼¥ë¤Ë´Ø¤·¤Æ
121 perldoc Encode::JP # ¤¦¤ÁÆüËܸìʸ»ú¥³¡¼¥É¤Ë´Ø¤·¤Æ
123 =head2 PerlÁ´È̤˴ؤ¹¤ë URL
127 =item L<http://www.perl.com/>
129 Perl ¥Û¡¼¥à¥Ú¡¼¥¸ (O'Reilly and Associates)
131 =item L<http://www.cpan.org/>
133 CPAN (Comprehensive Perl Archive Network)
135 =item L<http://lists.perl.org/>
137 Perl ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È½¸
141 =head2 Perl¤Î½¤ÆÀ¤ËÌòΩ¤Ä URL
145 =item L<http://www.oreilly.com.tw/chinese/>
147 O'Reilly ¼Ò¤ÎPerl´ØÏ¢½ñÀÒ(ÈËÂλúÃæ¹ñ¸ì)
149 =item L<http://www.oreilly.com.cn/chinese/>
151 O'Reilly ¼Ò¤ÎPerl´ØÏ¢½ñÀÒ(´ÊÂλúÃæ¹ñ¸ì)
153 =item L<http://www.oreilly.co.jp/catalog.htm>
155 ¥ª¥é¥¤¥ê¡¼¼Ò¤ÎPerl´ØÏ¢½ñÀÒ(ÆüËܸì)
159 =head2 Perl ¥æ¡¼¥¶¡¼¥°¥ë¡¼¥×
163 =item L<http://www.pm.org/groups/asia.shtml#China>
165 Ãæ¹ñ¡ÊÃæ²Ú¿Í̱¶¦Ï¹ñ¡Ë
167 =item L<http://www.pm.org/groups/asia.shtml#Japan>
171 =item L<http://www.pm.org/groups/asia.shtml#Korea%20(Republic%20of)>
175 =item L<http://www.pm.org/groups/asia.shtml#Taiwan>
181 =head2 Unicode´ØÏ¢¤ÎURL
185 =item L<http://www.unicode.org/>
187 Unicode ¥³¥ó¥½¡¼¥·¥¢¥à (Unicodeµ¬³Ê¤ÎÁªÄêÃÄÂÎ)
189 =item L<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
191 UTF-8 and Unicode FAQ for Unix/Linux
193 =item L<http://kldp.org/Translations/html/UTF8-Unicode-KLDP/UTF8-Unicode-KLDP.html>
195 UTF-8 and Unicode FAQ for Unix/Linux (¥Ï¥ó¥°¥ëÌõ)
201 Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
202 Dan Kogai (¾®»ô¡¡ÃÆ) E<lt>dankogai@dan.co.jpE<gt>