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
|
---|