Correcting mistaken description of 'delete local' in perl5110delta
[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 =encoding euc-jp
8
9 =head1 NAME
10
11 perljp - ÆüËܸì Perl ¥¬¥¤¥É
12
13 =head1 ÀâÌÀ
14
15 Perl ¤ÎÀ¤³¦¤Ø¤è¤¦¤³¤½!
16
17 Perl 5.8.0 ¤è¤ê¡¢Unicode¥µ¥Ý¡¼¥È¤¬ÂçÉý¤Ë¶¯²½¤µ¤ì¡¢¤½¤Î·ë²Ì¥é¥Æ¥óʸ»ú°Ê³°¤Îʸ»ú¥³¡¼¥É¤Î¥µ¥Ý¡¼¥È¤¬ CJK (Ãæ¹ñ¸ì¡¢ÆüËܸ졢¥Ï¥ó¥°¥ë)¤ò´Þ¤á¤Æ²Ã¤ï¤ê¤Þ¤·¤¿¡£Unicode¤ÏÀ¤³¦Ãæ¤Îʸ»ú¤ò°ì¤Ä¤Îʸ»ú¥³¡¼¥É¤Ç°·¤¦¤³¤È¤òÌܻؤ·¤¿É¸½àµ¬³Ê¤Ç¤¢¤ê¡¢Å줫¤éÀ¾¡¢¤Ï¤¿¤Þ¤¿¤½¤Î´Ö¤Îʸ»ú¡Ê¥®¥ê¥·¥ãʸ»ú¡¢¥­¥ê¡¼¥ëʸ»ú¡¢¥¢¥é¥Ó¥¢Ê¸»ú¡¢¥Ø¥Ö¥é¥¤Ê¸»ú¡¢¥Ç¥£¡¼¥ô¥¡¥Ê¥¬¡¼¥êʸ»ú¡¢¤Ê¤É¤Ê¤É¡Ë¤ä¡¢¤³¤ì¤Þ¤Ç¤ÏOS¥Ù¥ó¥À¡¼¤¬Æȼ«¤ËÄê¤á¤Æ¤¤¤¿Ê¸»ú(PC¤ª¤è¤ÓMacintosh)¤¬¤¹¤Ç¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
18
19 Perl ¼«¿È¤Ï Unicode ¤ÇÆ°ºî¤·¤Þ¤¹¡£Perl ¥¹¥¯¥ê¥×¥ÈÆâ¤Îʸ»úÎó¥ê¥Æ¥é¥ë¤äÀµµ¬É½¸½¤Ï Unicode ¤òÁ°Äó¤È¤·¤Æ¤¤¤Þ¤¹¡£¤½¤·¤ÆÆþ½ÐÎϤΤ¿¤á¤Ë¤Ï¡¢¤³¤ì¤Þ¤Ç»È¤ï¤ì¤Æ¤­¤¿¤µ¤Þ¤¶¤Þ¤Êʸ»ú¥³¡¼¥É¤ËÂбþ¤¹¤ë¥â¥¸¥å¡¼¥ë¡¢¡Ö Encode ¡×¤¬É¸½àÁõÈ÷¤µ¤ì¤Æ¤ª¤ê¡¢Unicode ¤È¤³¤ì¤é¤Îʸ»ú¥³¡¼¥É¤ÎÁê¸ßÊÑ´¹¤â´Êñ¤Ë¹Ô¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
20
21 ¸½»þÅÀ¤Ç Encode ¤¬¥µ¥Ý¡¼¥È¤¹¤ëʸ»ú¥³¡¼¥É¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£
22
23   7bit-jis      AdobeStandardEncoding AdobeSymbol       AdobeZdingbat
24   ascii             big5              big5-hkscs        cp1006
25   cp1026            cp1047            cp1250            cp1251
26   cp1252            cp1253            cp1254            cp1255
27   cp1256            cp1257            cp1258            cp37
28   cp424             cp437             cp500             cp737
29   cp775             cp850             cp852             cp855
30   cp856             cp857             cp860             cp861
31   cp862             cp863             cp864             cp865
32   cp866             cp869             cp874             cp875
33   cp932             cp936             cp949             cp950
34   dingbats          euc-cn            euc-jp            euc-kr
35   gb12345-raw       gb2312-raw        gsm0338           hp-roman8
36   hz                iso-2022-jp       iso-2022-jp-1     iso-8859-1
37   iso-8859-10       iso-8859-11       iso-8859-13       iso-8859-14
38   iso-8859-15       iso-8859-16       iso-8859-2        iso-8859-3
39   iso-8859-4        iso-8859-5        iso-8859-6        iso-8859-7
40   iso-8859-8        iso-8859-9        iso-ir-165        jis0201-raw
41   jis0208-raw       jis0212-raw       johab             koi8-f
42   koi8-r            koi8-u            ksc5601-raw       MacArabic
43   MacCentralEurRoman  MacChineseSimp    MacChineseTrad    MacCroatian
44   MacCyrillic       MacDingbats       MacFarsi          MacGreek
45   MacHebrew         MacIcelandic      MacJapanese       MacKorean
46   MacRoman          MacRomanian       MacRumanian       MacSami
47   MacSymbol         MacThai           MacTurkish        MacUkrainian
48   nextstep          posix-bc          shiftjis          symbol
49   UCS-2BE           UCS-2LE           UTF-16            UTF-16BE
50   UTF-16LE          UTF-32            UTF-32BE          UTF-32LE
51   utf8              viscii                              
52
53 (Á´114¼ïÎà)
54
55 Î㤨¤Ð¡¢Ê¸»ú¥³¡¼¥ÉFOO¤Î¥Õ¥¡¥¤¥ë¤òUTF-8¤ËÊÑ´¹¤¹¤ë¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£
56
57     perl -Mencoding=FOO,STDOUT,utf8 -pe1 < file.FOO > file.utf8
58
59 ¤Þ¤¿¡¢Perl¤Ë¤Ï¡¢Á´Éô¤¬Perl¤Ç½ñ¤«¤ì¤¿Ê¸»ú¥³¡¼¥ÉÊÑ´¹¥æ¡¼¥Æ¥£¥ê¥Æ¥£¡¢piconv¤âÉÕ°¤·¤Æ¤¤¤ë¤Î¤Ç¡¢°Ê²¼¤Î¤è¤¦¤Ë¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£
60
61    piconv -f FOO -t utf8 < file.FOO > file.utf8
62    piconv -f utf8 -t FOO < file.utf8 > file.FOO
63
64 =head2 About (jcode.pl|Jcode.pm|JPerl)
65
66 5.8°ÊÁ°¤Î¡¢¥¹¥¯¥ê¥×¥È¤¬EUC-JP¤Ç¤¢¤ì¤Ð¥ê¥Æ¥é¥ë¤À¤±¤Ï°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤·¤¿¡£¤Þ¤¿¡¢Æþ½ÐÎϤò°·¤¦¥â¥¸¥å¡¼¥ë¤È¤·¤Æ¤ÏJcode.pm¤¬( http://openlab.ring.gr.jp/Jcode/ )¡¢perl4ÍѤΥ桼¥Æ¥£¥ê¥Æ¥£¤È¤·¤Æ¤Ïjcode.pl¤¬¤½¤ì¤¾¤ì¸ºß¤·¡¢ÆüËܸì¤Î°·¤¨¤ëCGI¤Ç¤è¤¯ÍøÍѤµ¤ì¤Æ¤¤¤ë¤³¤È¤ò¸æ¸¤¸¤ÎÊý¤â¾¯¤Ê¤¯¤Ê¤¤¤«¤È»×¤ï¤ì¤Þ¤¹¡£¤¿¤À¤·¡¢ÆüËܸì¤Ë¤è¤ëÀµµ¬É½¸½¤ò¤¦¤Þ¤¯°·¤¦¤³¤È¤ÏÉÔ²Äǽ¤Ç¤·¤¿¡£
67
68 5.005°ÊÁ°¤ÎPerl¤Ë¤Ï¡¢ÆüËܸì¤ËÆò½¤·¤¿¥í¡¼¥«¥é¥¤¥ºÈÇ¡¢Jperl¤¬Â¸ºß¤·¤Þ¤·¤¿( http://homepage2.nifty.com/kipp/perl/jperl/index.html )¡£¤Þ¤¿¡¢Mac OS 9.x/ClassicÍѤÎPerl¡¢MacPerl¤ÎÆüËܸìÈǤâMacJPerl¤È¤·¤Æ¸ºß¤·¤Æ¤Þ¤·¤¿¡£( http://habilis.net/macjperl/ ).¤³¤ì¤é¤Ç¤Ïʸ»ú¥³¡¼¥É¤È¤·¤ÆEUC-JP¤Ë²Ã¤¨Shift_JIS¤â¤½¤Î¤Þ¤Þ°·¤¦¤³¤È¤¬¤Ç¤­¡¢¤Þ¤¿ÆüËܸì¤Ë¤è¤ëÀµµ¬É½¸½¤ò°·¤¦¤³¤È¤â²Äǽ¤Ç¤·¤¿¡£
69
70 Perl5.8¤Ç¤Ï¡¢¤³¤ì¤é¤Îµ¡Ç½¤¬¤¹¤Ù¤ÆPerlËÜÂΤÀ¤±¤Ç¼Â¸½¤Ç¤­¤ë¾å¤Ë¡¢ÆüËܸì¤Î¤ß¤Ê¤é¤º¾åµ­114¤Îʸ»ú¥³¡¼¥É¤ò¤¹¤Ù¤Æ¡¢¤·¤«¤âƱ»þ¤Ë°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤µ¤é¤Ë¡¢CPAN¤Ê¤É¤«¤é¿·¤·¤¤Ê¸»ú¥³¡¼¥ÉÍѤΥ⥸¥å¡¼¥ë¤òÆþ¼ê¤¹¤ë¤³¤È¤â´Êñ¤Ë¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
71
72 =over 4
73
74 =item *
75
76 Æþ½ÐÎÏ
77
78 °Ê²¼¤ÎÎã¤Ï¤¤¤Å¤ì¤âShift_JIS¤ÎÆþÎϤòEUC-JP¤ËÊÑ´¹¤·¤Æ½ÐÎϤ·¤Þ¤¹¡£
79
80   # jcode.pl
81   require "jcode.pl";
82   while(<>){
83     jcode::convert(*_, 'euc', 'sjis');
84     print;
85   }
86   # Jcode.pm
87   use Jcode;
88   while(<>){
89         print Jcode->new($_, 'sjis')->euc;
90   }
91   # Perl 5.8
92   use Encode;
93   while(<>){
94     from_to($_, 'shiftjis', 'euc-jp');
95     print;
96   }
97   # Perl 5.8 - encoding ¤òÍøÍѤ·¤Æ
98   use encoding 'euc-jp', STDIN => 'shiftjis';
99   while(<>){
100         print;
101   }
102
103 =item *
104
105 Jperl ¸ß´¹¥¹¥¯¥ê¥×¥È
106
107  ¤¤¤ï¤æ¤ë"shebang"¤òÊѹ¹¤¹¤ë¤À¤±¤Ç¡¢JperlÍѤÎscript¤Î¤Û¤È¤ó¤É¤ÏÊѹ¹¤Ê¤·¤ËÍøÍѲÄǽ¤À¤È»×¤ï¤ì¤Þ¤¹¡£
108
109    #!/path/to/jperl
110    ¢­
111    #!/path/to/perl -Mencoding=euc-jp
112
113  ¾Ü¤·¤¯¤Ï perldoc encoding ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
114
115 =back
116
117 =head2 ¤µ¤é¤Ë¾Ü¤·¤¯
118
119 Perl¤Ë¤ÏËÄÂç¤Ê»ñÎÁ¤¬ÉÕ°¤·¤Æ¤ª¤ê¡¢Perl¤Î¿·µ¡Ç½¤äUnicode¥µ¥Ý¡¼¥È¡¢¤½¤·¤ÆEncode¥â¥¸¥å¡¼¥ë¤Î»ÈÍÑË¡¤Ê¤É¤¬ºÙ¤«¤¯ÌÖÍ夵¤ì¤Æ¤¤¤Þ¤¹¡Ê»ÄÇ°¤Ê¤¬¤é¡¢¤Û¤È¤ó¤É±Ñ¸ì¤Ç¤Ï¤¢¤ê¤Þ¤¹¤¬¡Ë¡£°Ê²¼¤Î¥³¥Þ¥ó¥É¤Ç¤½¤ì¤é¤Î°ìÉô¤ò±ÜÍ÷¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£
120
121   perldoc perlunicode # Perl¤ÎUnicode¥µ¥Ý¡¼¥ÈÁ´ÈÌ
122   perldoc Encode      # Encode¥â¥¸¥å¡¼¥ë¤Ë´Ø¤·¤Æ
123   perldoc Encode::JP  # ¤¦¤ÁÆüËܸìʸ»ú¥³¡¼¥É¤Ë´Ø¤·¤Æ
124
125 =head2 PerlÁ´È̤˴ؤ¹¤ë URL
126
127 =over 4
128
129 =item L<http://www.perl.com/>
130
131 Perl ¥Û¡¼¥à¥Ú¡¼¥¸ (O'Reilly and Associates)
132
133 =item L<http://www.cpan.org/>
134
135 CPAN (Comprehensive Perl Archive Network)
136
137 =item L<http://lists.perl.org/>
138
139 Perl ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È½¸
140
141 =back
142
143 =head2 Perl¤Î½¤ÆÀ¤ËÌòΩ¤Ä URL
144
145 =over 4
146
147 =item L<http://www.oreilly.com.tw/>
148
149 O'Reilly ¼Ò¤ÎPerl´ØÏ¢½ñÀÒ(ÈËÂλúÃæ¹ñ¸ì)
150
151 =item L<http://www.oreilly.com.cn/>
152
153 O'Reilly ¼Ò¤ÎPerl´ØÏ¢½ñÀÒ(´ÊÂλúÃæ¹ñ¸ì)
154
155 =item L<http://www.oreilly.co.jp/catalog/>
156
157 ¥ª¥é¥¤¥ê¡¼¼Ò¤ÎPerl´ØÏ¢½ñÀÒ(ÆüËܸì)
158
159 =back
160
161 =head2 Perl ¥æ¡¼¥¶¡¼¥°¥ë¡¼¥×
162
163 =over 4
164
165 =item L<http://www.pm.org/groups/asia.html>
166
167 =back
168
169 =head2 Unicode´ØÏ¢¤ÎURL
170
171 =over 4
172
173 =item L<http://www.unicode.org/>
174
175 Unicode ¥³¥ó¥½¡¼¥·¥¢¥à (Unicodeµ¬³Ê¤ÎÁªÄêÃÄÂÎ)
176
177 =item L<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
178
179 UTF-8 and Unicode FAQ for Unix/Linux
180
181 =item L<http://kldp.org/Translations/html/UTF8-Unicode-KLDP/UTF8-Unicode-KLDP.html>
182
183 UTF-8 and Unicode FAQ for Unix/Linux (¥Ï¥ó¥°¥ëÌõ)
184
185 =back
186
187 =head1 AUTHORS
188
189 Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
190 Dan Kogai (¾®»ô¡¡ÃÆ) E<lt>dankogai@dan.co.jpE<gt>
191
192 =cut