Integrate mainline.
[p5sagit/p5-mst-13.2.git] / README.jp
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.
4
5 The following documentation is written in euc-jp encoding.
6
7 =head1 NAME
8
9 perljp - ÆüËܸì Perl ¥¬¥¤¥É
10
11 =head1 ÀâÌÀ
12
13 Perl ¤ÎÀ¤³¦¤Ø¤è¤¦¤³¤½!
14
15 Perl 5.8.0 ¤è¤ê¡¢Unicode¥µ¥Ý¡¼¥È¤¬ÂçÉý¤Ë¶¯²½¤µ¤ì¡¢¤½¤Î·ë²Ì¥é¥Æ¥óʸ»ú°Ê³°¤Îʸ»ú¥³¡¼¥É¤Î¥µ¥Ý¡¼¥È¤¬ CJK (Ãæ¹ñ¸ì¡¢ÆüËܸ졢¥Ï¥ó¥°¥ë)¤ò´Þ¤á¤Æ²Ã¤ï¤ê¤Þ¤·¤¿¡£Unicode¤ÏÀ¤³¦Ãæ¤Îʸ»ú¤ò°ì¤Ä¤Îʸ»ú¥³¡¼¥É¤Ç°·¤¦¤³¤È¤òÌܻؤ·¤¿É¸½àµ¬³Ê¤Ç¤¢¤ê¡¢Å줫¤éÀ¾¡¢¤Ï¤¿¤Þ¤¿¤½¤Î´Ö¤Îʸ»ú¡Ê¥®¥ê¥·¥ãʸ»ú¡¢¥­¥ê¡¼¥ëʸ»ú¡¢¥¢¥é¥Ó¥¢Ê¸»ú¡¢¥Ø¥Ö¥é¥¤Ê¸»ú¡¢¥Ç¥£¡¼¥ô¥¡¥Ê¥¬¡¼¥êʸ»ú¡¢¤Ê¤É¤Ê¤É¡Ë¤ä¡¢¤³¤ì¤Þ¤Ç¤ÏOS¥Ù¥ó¥À¡¼¤¬Æȼ«¤ËÄê¤á¤Æ¤¤¤¿Ê¸»ú(PC¤ª¤è¤ÓMacintosh)¤¬¤¹¤Ç¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
16
17 Perl ¼«¿È¤Ï Unicode ¤ÇÆ°ºî¤·¤Þ¤¹¡£Perl ¥¹¥¯¥ê¥×¥ÈÆâ¤Îʸ»úÎó¥ê¥Æ¥é¥ë¤äÀµµ¬É½¸½¤Ï Unicode ¤òÁ°Äó¤È¤·¤Æ¤¤¤Þ¤¹¡£¤½¤·¤ÆÆþ½ÐÎϤΤ¿¤á¤Ë¤Ï¡¢¤³¤ì¤Þ¤Ç»È¤ï¤ì¤Æ¤­¤¿¤µ¤Þ¤¶¤Þ¤Êʸ»ú¥³¡¼¥É¤ËÂбþ¤¹¤ë¥â¥¸¥å¡¼¥ë¡¢¡Ö Encode ¡×¤¬É¸½àÁõÈ÷¤µ¤ì¤Æ¤ª¤ê¡¢Unicode ¤È¤³¤ì¤é¤Îʸ»ú¥³¡¼¥É¤ÎÁê¸ßÊÑ´¹¤â´Êñ¤Ë¹Ô¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
18
19 ¸½»þÅÀ¤Ç Encode ¤¬¥µ¥Ý¡¼¥È¤¹¤ëʸ»ú¥³¡¼¥É¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£
20
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
49   utf8              viscii                              
50
51 (Á´114¼ïÎà)
52
53 Î㤨¤Ð¡¢Ê¸»ú¥³¡¼¥ÉFOO¤Î¥Õ¥¡¥¤¥ë¤òUTF-8¤ËÊÑ´¹¤¹¤ë¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£
54
55     perl -Mencoding=FOO,STDOUT,utf8 -pe1 < file.FOO > file.utf8
56
57 ¤Þ¤¿¡¢Perl¤Ë¤Ï¡¢Á´Éô¤¬Perl¤Ç½ñ¤«¤ì¤¿Ê¸»ú¥³¡¼¥ÉÊÑ´¹¥æ¡¼¥Æ¥£¥ê¥Æ¥£¡¢piconv¤âÉÕ°¤·¤Æ¤¤¤ë¤Î¤Ç¡¢°Ê²¼¤Î¤è¤¦¤Ë¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£
58
59    piconv -f FOO -t utf8 < file.FOO > file.utf8
60    piconv -f utf8 -t FOO < file.utf8 > file.FOO
61
62 =head2 About (jcode.pl|Jcode.pm|JPerl)
63
64 5.8°ÊÁ°¤Î¡¢¥¹¥¯¥ê¥×¥È¤¬EUC-JP¤Ç¤¢¤ì¤Ð¥ê¥Æ¥é¥ë¤À¤±¤Ï°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤·¤¿¡£¤Þ¤¿¡¢Æþ½ÐÎϤò°·¤¦¥â¥¸¥å¡¼¥ë¤È¤·¤Æ¤ÏJcode.pm¤¬( http://openlab.jp/Jcode/ )¡¢perl4ÍѤΥ桼¥Æ¥£¥ê¥Æ¥£¤È¤·¤Æ¤Ïjcode.pl( http://srekcah.org/jcode/ )¤¬¤½¤ì¤¾¤ì¸ºß¤·¡¢ÆüËܸì¤Î°·¤¨¤ëCGI¤Ç¤è¤¯ÍøÍѤµ¤ì¤Æ¤¤¤ë¤³¤È¤ò¸æ¸¤¸¤ÎÊý¤â¾¯¤Ê¤¯¤Ê¤¤¤«¤È»×¤ï¤ì¤Þ¤¹¡£¤¿¤À¤·¡¢ÆüËܸì¤Ë¤è¤ëÀµµ¬É½¸½¤ò¤¦¤Þ¤¯°·¤¦¤³¤È¤ÏÉÔ²Äǽ¤Ç¤·¤¿¡£
65
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¤â¤½¤Î¤Þ¤Þ°·¤¦¤³¤È¤¬¤Ç¤­¡¢¤Þ¤¿ÆüËܸì¤Ë¤è¤ëÀµµ¬É½¸½¤ò°·¤¦¤³¤È¤â²Äǽ¤Ç¤·¤¿¡£
67
68 Perl5.8¤Ç¤Ï¡¢¤³¤ì¤é¤Îµ¡Ç½¤¬¤¹¤Ù¤ÆPerlËÜÂΤÀ¤±¤Ç¼Â¸½¤Ç¤­¤ë¾å¤Ë¡¢ÆüËܸì¤Î¤ß¤Ê¤é¤º¾åµ­114¤Îʸ»ú¥³¡¼¥É¤ò¤¹¤Ù¤Æ¡¢¤·¤«¤âƱ»þ¤Ë°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤µ¤é¤Ë¡¢CPAN¤Ê¤É¤«¤é¿·¤·¤¤Ê¸»ú¥³¡¼¥ÉÍѤΥ⥸¥å¡¼¥ë¤òÆþ¼ê¤¹¤ë¤³¤È¤â´Êñ¤Ë¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
69
70 =over 4
71
72 =item *
73
74 Æþ½ÐÎÏ
75
76 °Ê²¼¤ÎÎã¤Ï¤¤¤Å¤ì¤âShift_JIS¤ÎÆþÎϤòEUC-JP¤ËÊÑ´¹¤·¤Æ½ÐÎϤ·¤Þ¤¹¡£
77
78   # jcode.pl
79   require "jcode.pl";
80   while(<>){
81     jcode::convert(*_, 'euc', 'sjis');
82     print;
83   }
84   # Jcode.pm
85   use Jcode;
86   while(<>){
87         print Jcode->new($_, 'sjis')->euc;
88   }
89   # Perl 5.8
90   use Encode;
91   while(<>){
92     from_to($_, 'shiftjis', 'euc-jp');
93     print;
94   }
95   # Perl 5.8 - encoding ¤òÍøÍѤ·¤Æ
96   use encoding 'euc-jp', STDIN => 'shiftjis';
97   while(<>){
98         print;
99   }
100
101 =item *
102
103 Jperl ¸ß´¹¥¹¥¯¥ê¥×¥È
104
105  ¤¤¤ï¤æ¤ë"shebang"¤òÊѹ¹¤¹¤ë¤À¤±¤Ç¡¢JperlÍѤÎscript¤Î¤Û¤È¤ó¤É¤ÏÊѹ¹¤Ê¤·¤ËÍøÍѲÄǽ¤À¤È»×¤ï¤ì¤Þ¤¹¡£
106
107    #!/path/to/jperl
108    ¢­
109    #!/path/to/perl -Mencoding=euc-jp
110
111  ¾Ü¤·¤¯¤Ï perldoc encoding ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
112
113 =back
114
115 =head2 ¤µ¤é¤Ë¾Ü¤·¤¯
116
117 Perl¤Ë¤ÏËÄÂç¤Ê»ñÎÁ¤¬ÉÕ°¤·¤Æ¤ª¤ê¡¢Perl¤Î¿·µ¡Ç½¤äUnicode¥µ¥Ý¡¼¥È¡¢¤½¤·¤ÆEncode¥â¥¸¥å¡¼¥ë¤Î»ÈÍÑË¡¤Ê¤É¤¬ºÙ¤«¤¯ÌÖÍ夵¤ì¤Æ¤¤¤Þ¤¹¡Ê»ÄÇ°¤Ê¤¬¤é¡¢¤Û¤È¤ó¤É±Ñ¸ì¤Ç¤Ï¤¢¤ê¤Þ¤¹¤¬¡Ë¡£°Ê²¼¤Î¥³¥Þ¥ó¥É¤Ç¤½¤ì¤é¤Î°ìÉô¤ò±ÜÍ÷¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£
118
119   perldoc perlunicode # Perl¤ÎUnicode¥µ¥Ý¡¼¥ÈÁ´ÈÌ
120   perldoc Encode      # Encode¥â¥¸¥å¡¼¥ë¤Ë´Ø¤·¤Æ
121   perldoc Encode::JP  # ¤¦¤ÁÆüËܸìʸ»ú¥³¡¼¥É¤Ë´Ø¤·¤Æ
122
123 =head2 PerlÁ´È̤˴ؤ¹¤ë URL
124
125 =over 4
126
127 =item L<http://www.perl.com/>
128
129 Perl ¥Û¡¼¥à¥Ú¡¼¥¸ (O'Reilly and Associates)
130
131 =item L<http://www.cpan.org/>
132
133 CPAN (Comprehensive Perl Archive Network)
134
135 =item L<http://lists.perl.org/>
136
137 Perl ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È½¸
138
139 =back
140
141 =head2 Perl¤Î½¤ÆÀ¤ËÌòΩ¤Ä URL
142
143 =over 4
144
145 =item L<http://www.oreilly.com.tw/chinese/>
146
147 O'Reilly ¼Ò¤ÎPerl´ØÏ¢½ñÀÒ(ÈËÂλúÃæ¹ñ¸ì)
148
149 =item L<http://www.oreilly.com.cn/chinese/>
150
151 O'Reilly ¼Ò¤ÎPerl´ØÏ¢½ñÀÒ(´ÊÂλúÃæ¹ñ¸ì)
152
153 =item L<http://www.oreilly.co.jp/catalog.htm>
154
155 ¥ª¥é¥¤¥ê¡¼¼Ò¤ÎPerl´ØÏ¢½ñÀÒ(ÆüËܸì)
156
157 =back
158
159 =head2 Perl ¥æ¡¼¥¶¡¼¥°¥ë¡¼¥×
160
161 =over 4
162
163 =item L<http://www.pm.org/groups/asia.shtml#China>
164
165 Ãæ¹ñ¡ÊÃæ²Ú¿Í̱¶¦Ï¹ñ¡Ë
166
167 =item L<http://www.pm.org/groups/asia.shtml#Japan>
168
169 ÆüËÜ
170
171 =item L<http://www.pm.org/groups/asia.shtml#Korea%20(Republic%20of)>
172
173 ´Ú¹ñ¡ÊÂç´Ú̱¹ñ¡Ë
174
175 =item L<http://www.pm.org/groups/asia.shtml#Taiwan>
176
177 ÂæÏÑ¡ÊÃæ²Ú̱¹ñ¡Ë
178
179 =back
180
181 =head2 Unicode´ØÏ¢¤ÎURL
182
183 =over 4
184
185 =item L<http://www.unicode.org/>
186
187 Unicode ¥³¥ó¥½¡¼¥·¥¢¥à (Unicodeµ¬³Ê¤ÎÁªÄêÃÄÂÎ)
188
189 =item L<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
190
191 UTF-8 and Unicode FAQ for Unix/Linux
192
193 =item L<http://kldp.org/Translations/html/UTF8-Unicode-KLDP/UTF8-Unicode-KLDP.html>
194
195 UTF-8 and Unicode FAQ for Unix/Linux (¥Ï¥ó¥°¥ëÌõ)
196
197 =back
198
199 =head1 AUTHORS
200
201 Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
202 Dan Kogai (¾®»ô¡¡ÃÆ) E<lt>dankogai@dan.co.jpE<gt>
203
204 =cut