From: Jarkko Hietaniemi Date: Wed, 17 Apr 2002 20:57:36 +0000 (+0000) Subject: README.cjk update. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f092799b3cc7692539f53c1932a8808058335e26;p=p5sagit%2Fp5-mst-13.2.git README.cjk update. p4raw-id: //depot/perl@15980 --- diff --git a/README.cn b/README.cn index eb7f7a9..11b5875 100644 --- a/README.cn +++ b/README.cn @@ -4,9 +4,9 @@ specially designed to be readable as is. The following documentation is written in EUC-CN encoding. -?ç¹?ÄãÓÃÒ»°ãµÄÎÄ×ֱ༭Æ÷ÔÄÀÀÕâ·ÝÎĵµ, ÇëºöÂÔÎÄÖÐÆæÌصÄ×¢¼Ç×Ö·û. Õâ·ÝÎÄ -¼þÊÇÒÔ POD (¼òÃ÷Îĵµ¸ñʽ) д³É; ÕâÖÖ¸ñʽÊÇΪÁËÄÜ?ÃÈËÖ±½Ó¶ÁÈ¡¶øÌرðÉè¼? -µÄ. ¹ØÓڴ˸ñʽµÄ½øÒ»²½×ÊѶ, Çë²Î¿¼ perlpod ÏßÉÏÎĵµ. +Èç¹ûÄãÓÃÒ»°ãµÄÎÄ×ֱ༭Æ÷ÔÄÀÀÕâ·ÝÎļþ, ÇëºöÂÔÎÄÖÐÆæÌصÄ×¢¼Ç×Ö·û. +Õâ·ÝÎļþÊÇÒÔ POD (¼òÃ÷Îļþ¸ñʽ) д³É; ÕâÖÖ¸ñʽÊÇΪÁËÄÜÈÃÈËÖ±½Ó¶ÁÈ¡, +¶øÌرðÉè¼ÆµÄ. ¹ØÓڴ˸ñʽµÄ½øÒ»²½ÐÅÏ¢, Çë²Î¿¼ perlpod ÏßÉÏÎļþ. =head1 NAME @@ -16,16 +16,16 @@ perlcn - »¶Ó­À´µ½ Perl µÄÌìµØ! -´Ó 5.8.0 °æ¿ªÊ¼, Perl ¾ß±¸ÁËÏ꾡µÄ Unicode (ͳһÂë) Ö§Ô®, Ò²Á¬´øÖ§Ô®ÁË -Ðí¶àÀ­¶¡ÓïϵÒÔÍâµÄ±àÂ뷽ʽ; CJK (ÖÐ?Õº?) ±ãÊÇÆäÖеÄÒ»²¿·Ý. Unicode ÊÇ -¹ú¼ÊÐԵıê×¼, ÊÔͼº­¸ÇÊÀ½çÉÏËùÓеÄ×Ö·û: Î÷·½ÊÀ½ç, ¶«·½ÊÀ½ç, ÒÔ¼°Á½Õß¼ä -µÄÒ»ÇÐ (Ï£À°ÎÄ, ÐðÀûÑÇÎÄ, °¢À­²®ÎÄ, Ï£²®À´ÎÄ, Ó¡¶ÈÎÄ, Ó¡µØ°²ÎÄ, µÈµÈ). -ËüÒ²?ÝÄÉÁ˶àÖÖ×÷ҵϵͳÓëƽÌ? (?? PC ¼°Âó½ðËþ). +´Ó 5.8.0 °æ¿ªÊ¼, Perl ¾ß±¸ÁËÍêÉÆµÄ Unicode (ͳһÂë) Ö§Ô®, +Ò²Á¬´øÖ§Ô®ÁËÐí¶àÀ­¶¡ÓïϵÒÔÍâµÄ±àÂ뷽ʽ; CJK (ÖÐÈÕº«) ±ãÊÇÆäÖеÄÒ»²¿·Ý. +Unicode Êǹú¼ÊÐԵıê×¼, ÊÔͼº­¸ÇÊÀ½çÉÏËùÓеÄ×Ö·û: Î÷·½ÊÀ½ç, ¶«·½ÊÀ½ç, +ÒÔ¼°Á½Õß¼äµÄÒ»ÇÐ (Ï£À°ÎÄ, ÐðÀûÑÇÎÄ, ÑÇÀ­²®ÎÄ, Ï£²®À´ÎÄ, Ó¡¶ÈÎÄ, +Ó¡µØ°²ÎÄ, µÈµÈ). ËüÒ²ÈÝÄÉÁ˶àÖÖ×÷ҵϵͳÓëƽ̨ (Èç PC ¼°Âó½ðËþ). -Perl ±¾ÉíÒÔ Unicode ½øÐвÙ×÷. Õâ±íʾ Perl ÄÚ²¿µÄ×Ö´®×ÊÁÏ¿ÉÓà Unicode -±íʾ, Perl µÄº¯Ê½ÓëËã·û (Àý?çÕ?¹æ±íʾʽ±È¶Ô) Ò²ÄÜ¶Ô Unicode ½øÐвÙ×÷. -ÔÚÊä?ë¼°Êä³öÊ?, ΪÁË´¦ÀíÒÔ Unicode ֮ǰµÄ±àÂ뷽ʽ´¢´æµÄ×ÊÁÏ, Perl Ìṩ -ÁË¡¸Encode¡¹Õâ¸öÄ£¿é, ¿ÉÒÔ?ÃÄãÇáÒ׵ضÁÈ¡¼°Ð´Èë¾ÉÓеıàÂë×ÊÁ?. +Perl ±¾ÉíÒÔ Unicode ½øÐвÙ×÷. Õâ±íʾ Perl ÄÚ²¿µÄ×Ö·û´®Êý¾Ý¿ÉÓà Unicode +±íʾ; Perl µÄº¯Ê½ÓëËã·û (ÀýÈçÕý¹æ±íʾʽ±È¶Ô) Ò²ÄÜ¶Ô Unicode ½øÐвÙ×÷. +ÔÚÊäÈë¼°Êä³öʱ, ΪÁË´¦ÀíÒÔ Unicode ֮ǰµÄ±àÂ뷽ʽ´¢´æµÄÊý¾Ý, Perl +ÌṩÁË Encode Õâ¸öÄ£¿é, ¿ÉÒÔÈÃÄãÇáÒ׵ضÁÈ¡¼°Ð´Èë¾ÉÓеıàÂëÊý¾Ý. Encode ÑÓÉìÄ£¿éÖ§Ô®ÏÂÁмòÌåÖÐÎĵıàÂ뷽ʽ: @@ -36,46 +36,51 @@ Encode cp936 ×ÖÂëÒ³ 936, Ò²³ÆΪ GBK (À©³ä¹ú±êÂë) hz 7 ±ÈÌØÒݳöʽ GB2312 ±àÂë -¾ÙÀýÀ´Ëµ, ½« euc-cn ±àÂëµÄµµ°¸×ª³É Unicode, ìóÐè¼ü?ëÏÂÁÐÖ¸Á?: +¾ÙÀýÀ´Ëµ, ½« EUC-CN ±àÂëµÄµµ°¸×ª³É Unicode, ìóÐè¼üÈëÏÂÁÐÖ¸Áî: perl -Mencoding=euc-cn,STDOUT,utf8 -pe1 < file.euc-cn > file.utf8 -Perl Ò²ÄÚ¸½ÁË¡¸piconv¡¹, Ò»Ö§Íê?«Ò? Perl д³ÉµÄ×Ö·ûת»»¹¤¾ß³ÌÐò, Ó÷¨ -?çÏ?: +Perl Ò²ÄÚ¸½ÁË "piconv", Ò»Ö§ÍêÈ«ÒÔ Perl д³ÉµÄ×Ö·ûת»»¹¤¾ß³ÌÐò, Ó÷¨ÈçÏÂ: piconv -f euc-cn -t utf8 < file.euc-cn > file.utf8 piconv -f utf8 -t euc-cn < file.utf8 > file.euc-cn -ÁíÍâ, ÀûÓà encoding Ä£¿é, Äã¿ÉÒÔÇáÒ×д³öÒÔ×Ö·ûΪµ¥Î»µÄ³ÌÐòÂë, ?çÏÂËùÊ?: +ÁíÍâ, ÀûÓà encoding Ä£¿é, Äã¿ÉÒÔÇáÒ×д³öÒÔ×Ö·ûΪµ¥Î»µÄ³ÌÐòÂë, ÈçÏÂËùʾ: #!/usr/bin/env perl - # Æô¶¯ euc-cn ×Ö´®½âÎö; ±ê×¼Êä³ö?ë¼°±ê×¼´íÎó¶¼ÉèÎ? euc-cn ±àÂë - use encoding 'euc-cn', STDIN => 'euc-cn', - STDOUT => 'euc-cn', STDERR => 'euc-cn'; - + # Æô¶¯ euc-cn ×Ö´®½âÎö; ±ê×¼Êä³öÈë¼°±ê×¼´íÎó¶¼ÉèΪ euc-cn ±àÂë + use encoding 'euc-cn', STDIN => 'euc-cn', STDOUT => 'euc-cn'; print length("ÂæÍÕ"); # 2 (Ë«ÒýºÅ±íʾ×Ö·û) - print length('ÂæÍÕ'); # 4 (µ¥ÒýºÅ±íʾ×Ö½Ú) - print index("×»×»½Ì»å", "»×»½"); # -1 (²»°üº¬´Ë×Ó×Ö´®) + print length('ÂæÍÕ'); # 4 (µ¥ÒýºÅ±íʾλԪ×é) + print index("×»×»½Ì»å", "»×»½"); # -1 (²»°üº¬´Ë×Ó×Ö·û´®) print index('×»×»½Ì»å', '»×»½'); # 1 (´ÓµÚ¶þ¸ö×Ö½Ú¿ªÊ¼) +ÔÚ×îºóÒ»ÁÐÀý×ÓÀï, "×»" µÄµÚ¶þ¸öλԪ×éÓë "×»" µÄµÚÒ»¸öλԪ×é½áºÏ³É EUC-CN +ÂëµÄ "»×"; "×»" µÄµÚ¶þ¸öλԪ×éÔòÓë "½Ì" µÄµÚÒ»¸öλԪ×é½áºÏ³É "»½". +Õâ½â¾öÁËÒÔÇ° EUC-CN Âë±È¶Ô´¦ÀíÉϳ£¼ûµÄÎÊÌâ. + =head2 ¶îÍâµÄÖÐÎıàÂë -?ç¹?ÐèÒª¸ü¶àµÄÖÐÎıàÂë, ¿ÉÒÔ´Ó CPAN (L) ÏÂÔØ +Èç¹ûÐèÒª¸ü¶àµÄÖÐÎıàÂë, ¿ÉÒÔ´Ó CPAN (L) ÏÂÔØ Encode::HanExtra Ä£¿é. ËüÄ¿Ç°ÌṩÏÂÁбàÂ뷽ʽ: gb18030 À©³ä¹ýµÄ¹ú±êÂë, °üº¬·±ÌåÖÐÎÄ ÁíÍâ, Encode::HanConvert Ä£¿éÔòÌṩÁ˼ò·±×ª»»ÓõÄÁ½ÖÖ±àÂë: - gbk-trad GBK ¼òÌåÖÐÎÄÓë Unicode ·±ÌåÖÐÎÄ»¥×ª big5-simp Big5 ·±ÌåÖÐÎÄÓë Unicode ¼òÌåÖÐÎÄ»¥×ª + gbk-trad GBK ¼òÌåÖÐÎÄÓë Unicode ·±ÌåÖÐÎÄ»¥×ª -?ôÏëÔ? GBK Óë Big5 Ö®¼ä»¥×ª, Çë²Î¿¼¸ÃÄ£¿éÄÚ¸½µÄ b2g.pl Óë g2b.pl Á½ -Ö§³ÌÐò. +ÈôÏëÔÚ GBK Óë Big5 Ö®¼ä»¥×ª, Çë²Î¿¼¸ÃÄ£¿éÄÚ¸½µÄ b2g.pl Óë g2b.pl Á½Ö§³ÌÐò, +»òÔÚ³ÌÐòÄÚʹÓÃÏÂÁÐд·¨: -=head2 ½øÒ»²½µÄ×ÊѶ + use Encode::HanConvert; + $euc_cn = big5_to_gb($big5); # ´Ó Big5 תΪ GBK + $big5 = gb_to_big5($euc_cn); # ´Ó GBK תΪ Big5 -Çë²Î¿¼ Perl ÄÚ¸½µÄ´óÁ¿ËµÃ÷Îĵµ (²»ÐÒ?«ÊÇÓÃÓ?ÎÄдµÄ) , À´Ñ§Ï°¸ü¶à¹ØÓÚ +=head2 ½øÒ»²½µÄÐÅÏ¢ + +Çë²Î¿¼ Perl ÄÚ¸½µÄ´óÁ¿ËµÃ÷Îļþ (²»ÐÒÈ«ÊÇÓÃÓ¢ÎÄдµÄ), À´Ñ§Ï°¸ü¶à¹ØÓÚ Perl µÄ֪ʶ, ÒÔ¼° Unicode µÄʹÓ÷½Ê½. ²»¹ý, ÍⲿµÄ×ÊÔ´Ï൱·á¸»: =head2 Ìṩ Perl ×ÊÔ´µÄÍøÖ· @@ -130,6 +135,10 @@ Unix/Linux =back +=head1 SEE ALSO + +L, L, L, L, L + =head1 AUTHORS Jarkko Hietaniemi Ejhi@iki.fiE diff --git a/README.jp b/README.jp index 3286711..e05c50d 100644 --- a/README.jp +++ b/README.jp @@ -2,7 +2,7 @@ If you read this file _as_is_, just ignore the funny characters you see. It is written in the POD format (see perlpod manpage) which is specially designed to be readable as is. -The following documentation is written in FOO encoding. +The following documentation is written in euc-jp encoding. =head1 NAME @@ -10,7 +10,7 @@ perljp - =head1 ÀâÌÀ -¤è¤¦¤³¤½ Perl ¤Ø! +Perl ¤ÎÀ¤³¦¤Ø¤è¤¦¤³¤½! Perl 5.8.0 ¤è¤ê¡¢Unicode¥µ¥Ý¡¼¥È¤¬ÂçÉý¤Ë¶¯²½¤µ¤ì¡¢¤½¤Î·ë²Ì¥é¥Æ¥óʸ»ú°Ê³°¤Îʸ»ú¥³¡¼¥É¤Î¥µ¥Ý¡¼¥È¤¬ CJK (Ãæ¹ñ¸ì¡¢ÆüËܸ졢¥Ï¥ó¥°¥ë)¤ò´Þ¤á¤Æ²Ã¤ï¤ê¤Þ¤·¤¿¡£Unicode¤ÏÀ¤³¦Ãæ¤Îʸ»ú¤ò°ì¤Ä¤Îʸ»ú¥³¡¼¥É¤Ç°·¤¦¤³¤È¤òÌܻؤ·¤¿É¸½àµ¬³Ê¤Ç¤¢¤ê¡¢Å줫¤éÀ¾¡¢¤Ï¤¿¤Þ¤¿¤½¤Î´Ö¤Îʸ»ú¡Ê¥®¥ê¥·¥ãʸ»ú¡¢¥­¥ê¡¼¥ëʸ»ú¡¢¥¢¥é¥Ó¥¢Ê¸»ú¡¢¥Ø¥Ö¥é¥¤Ê¸»ú¡¢¥Ç¥£¡¼¥ô¥¡¥Ê¥¬¡¼¥êʸ»ú¡¢¤Ê¤É¤Ê¤É¡Ë¤ä¡¢¤³¤ì¤Þ¤Ç¤ÏOS¥Ù¥ó¥À¡¼¤¬Æȼ«¤ËÄê¤á¤Æ¤¤¤¿Ê¸»ú(PC¤ª¤è¤ÓMacintosh)¤¬¤¹¤Ç¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ @@ -71,7 +71,7 @@ Perl5.8 =item * -¡¡Æþ½ÐÎÏ +Æþ½ÐÎÏ °Ê²¼¤ÎÎã¤Ï¤¤¤Å¤ì¤âShift_JIS¤ÎÆþÎϤòEUC-JP¤ËÊÑ´¹¤·¤Æ½ÐÎϤ·¤Þ¤¹¡£ diff --git a/README.ko b/README.ko index e83bfc2..404e392 100644 --- a/README.ko +++ b/README.ko @@ -1,179 +1,192 @@ -If you read this file _as_is_, just ignore the funny characters you -see. It is written in the POD format (see perlpod manpage) which is -specially designed to be readable as is. - -This file is in Korean encoded in EUC-KR. - -ÀÌ ¹®¼­¸¦ perldocÀ» ½á¼­ º¸Áö ¾Ê°í Á÷Á¢ º¸´Â °æ¿ì¿¡´Â °¢ ºÎºÐÀÇ -¿ªÇÒÀ» Ç¥½ÃÇϱâ À§ÇØ ¾²ÀÎ =head, =item, 'L' µîÀº ¹«½ÃÇϽʽÿÀ. -ÀÌ ¹®¼­´Â µû·Î perldocÀ» ¾²Áö ¾Ê°í º¸´õ¶óµµ Àдµ¥ º° ÁöÀåÀÌ -¾ø´Â POD Çü½ÄÀ¸·Î Â¥¿© ÀÖ½À´Ï´Ù. ´õ ÀÚ¼¼ÇÑ °ÍÀº perlpod -¸Å´º¾óÀ» Âü°íÇϽʽÿÀ. - - -=head1 NAME - -perlko - Perl°ú Çѱ¹¾î ÀÎÄÚµù - -=head1 DESCRIPTION - -PerlÀÇ ¼¼°è¿¡ ¿À½Å °ÍÀ» ȯ¿µÇÕ´Ï´Ù ! - -Starting for Perl release 5.8.0 Perl has extensive support for Unicode -and as a part of that, extensive support for non-Latin characters -encodings, including the CJK (Chinese-Japanese Korean). Unicode is an -international standard that aims to include all of world's -characters: Western, Eastern, and everything in between (Greek, -Cyrillic, Arabic, Hebrew, Indic, Amerindian, and so on), and -encodings of various operating system platforms (PC and MacIntosh). - -PerlÀº 5.8.0 ¹öÀü¿¡¼­ºÎÅÍ À¯´ÏÄÚµå/ISO 10646¿¡ ´ëÇÑ ±¤¹üÀ§ÇÑ Áö¿ø ±â´ÉÀ» -°¡Áö°í ÀÖ½À´Ï´Ù. À¯´ÏÄÚµå Áö¿øÀÇ ÀÏȯÀ¸·Î ÇÑÁßÀÏÀ» ºñ·ÔÇÑ ¼¼°è °¢±¹¿¡¼­ -À¯´ÏÄÚµå ÀÌÀü¿¡ ¾²°í ÀÖ¾ú°í Áö±Ýµµ ³Î¸® ¾²ÀÌ°í ÀÖ´Â ¼ö¸¹Àº ÀÎÄÚµùÀ» -Áö¿øÇÕ´Ï´Ù. À¯´ÏÄÚµå´Â Àü ¼¼°è¿¡¼­ ¾²ÀÌ´Â ¸ðµç ¾ð¾î¸¦ À§ÇÑ Ç¥±â ü°è - -À¯·´ÀÇ ¶óƾ ¾ËÆĺª, Å°¸± ¾ËÆĺª, ±×¸®½º ¾ËÆĺª, Àεµ¿Í µ¿³² ¾Æ½Ã¾ÆÀÇ -ºê¶ó¹Ì ½ºÅ©¸³Æ® °è¿­, ¾Æ¶ø, È÷ºê¸®, ÇÑÁßÀÏÀÇ ÇÑÀÚ, Çѱ¹¾îÀÇ ÇѱÛ, -ÀϺ»¾îÀÇ °¡³ª, ºÏ¹Ì Àεð¾ÈÀÇ Ç¥±â ü°è µî- ¼ö¿ëÇÏ´Â °ÍÀ» ¸ñÇ¥·Î ÇÏ°í -Àֱ⠶§¹®¿¡ ±âÁ¸¿¡ ¾²ÀÌ´ø °¢ ¾ð¾î ¹× ±¹°¡ ±×¸®°í ¿î¿µ ü°è¿¡ °íÀ¯ÇÑ -¹®ÀÚ ÁýÇÕ°ú ÀÎÄÚµùÀ» ¸ðµÎ Æ÷°ýÇÏ°í ÀÖ½À´Ï´Ù. - - -PerlÀº ³»ºÎÀûÀ¸·Î À¯´ÏÄڵ带 ¹®ÀÚ Ç¥ÇöÀ» À§ÇØ »ç¿ëÇÕ´Ï´Ù. º¸´Ù ±¸Ã¼ÀûÀ¸·Î -¸»Çϸé Perl ½ºÅ©¸³Æ® ¾È¿¡¼­ UTF-8 ¹®ÀÚ¿­À» ¾µ ¼ö ÀÖ°í, -°¢Á¾ ÇÔ¼ö¿Í ¿¬»êÀÚ (¿¹¸¦ µé¾î, Á¤±Ô½Ä, index, substr)°¡ ¹ÙÀÌÆ® ´ÜÀ§ -´ë½Å À¯´ÏÄÚµå ±ÛÀÚ ´ÜÀ§·Î µ¿ÀÛÇÕ´Ï´Ù. (´õ ÀÚ¼¼ÇÑ °ÍÀº -perlunicode ¸Å´º¾óÀ» Âü°íÇϽʽÿÀ.) À¯´ÏÄڵ尡 ³Î¸® º¸±ÞµÇ±â Àü¿¡ -³Î¸® ¾²ÀÌ°í ÀÖ¾ú°í, ¿©ÀüÈ÷ ³Î¸® ¾²ÀÌ°í ÀÖ´Â °¢±¹/°¢ ¾ð¾îº° ÀÎÄÚµùÀ¸·Î -ÀÔÃâ·ÂÀ» ÇÏ°í À̵é ÀÎÄÚµùÀ¸·Î µÈ µ¥ÀÌÅÍ¿Í ¹®¼­¸¦ ´Ù·ç´Â °ÍÀ» µ½±â À§ÇØ -'Encode'°¡ ¾²¿´½À´Ï´Ù. ¹«¾ùº¸´Ù 'Encode'¸¦ ½á¼­ ¼ö¸¹Àº ÀÎÄÚµù »çÀÌÀÇ -º¯È¯À» ½±°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù. - -'Encode'´Â ´ÙÀ½°ú °°Àº Çѱ¹¾î ÀÎÄÚµùÀ» Áö¿øÇÕ´Ï´Ù. - - euc-kr : US-ASCII¿Í KS X 1001À» °°ÀÌ ¾²´Â ¸ÖƼ¹ÙÀÌÆ® ÀÎÄÚµù - (ÈçÈ÷ ¿Ï¼ºÇüÀ̶ó°í ºÒ¸².) KS X 2901°ú RFC 1557 Âü°í. - cp949 : MS-Windows 9x/ME¿¡¼­ ¾²ÀÌ´Â È®Àå ¿Ï¼ºÇü. - euc-kr¿¡ 8,822ÀÚÀÇ ÇÑ±Û À½ÀýÀ» ´õÇÑ °ÍÀÓ. - alias´Â uhc, windows-949, x-windows-949, - ks_c_5601-1987. ¸Ç ¸¶Áö¸· À̸§Àº ÀûÀýÇÏÁö ¾ÊÀº - À̸§ÀÌÁö¸¸, Microsoft Á¦Ç°¿¡¼­ CP949ÀÇ Àǹ̷Π- ¾²ÀÌ°í ÀÖÀ½. - johab : KS X 1001:1998 ºÎ·Ï 3¿¡¼­ ±ÔÁ¤ÇÑ Á¶ÇÕÇü. - ¹®ÀÚ ·¹ÆÛÅ丮´Â cp949¿Í ¸¶Âù°¡Áö·Î US-ASCII, - KS X 1001¿¡ 8,822ÀÚÀÇ ÇÑ±Û À½ÀýÀ» ´õÇÑ °ÍÀÓ. - - iso-2022-kr : RFC 1557¿¡¼­ ±ÔÁ¤ÇÑ Çѱ¹¾î ÀÎÅÍ³Ý ¸ÞÀÏ ±³È¯¿ë ÀÎÄÚµùÀ¸·Î - US-ASCII¿Í KS X 1001À» ·¹ÆÛÅ丮·Î ÇÏ´Â Á¡¿¡¼­ - euc-kr°ú °°Áö¸¸ ÀÎÄÚµù ¹æ½ÄÀÌ ´Ù¸§. - 1997-8³â °æ±îÁö ¾²¿´À¸³ª ´õ ÀÌ»ó ¸ÞÀÏ ±³È¯¿¡ ¾²ÀÌÁö - ¾ÊÀ½. - ksc5601-raw : KS X 1001(KS C 5601)À» GL(Áï, MSB¸¦ 0À¸·Î ÇÑ °æ¿ì) - ¿¡ ³õ¾ÒÀ» ¶§ÀÇ ÀÎÄÚµù. US-ASCII¿Í °áÇÕÇÏÁö ¾Ê°í - ´Üµ¶À¸·Î ¾²ÀÌ´Â ÀÏÀº X11 µî¿¡¼­ ±Û²Ã ÀÎÄÚµù - (ksc5601.1987-0. '0'Àº GLÀ» ÀǹÌÇÔ.)À¸·Î ¾²ÀÌ´Â °ÍÀ» - Á¦¿ÜÇÏ°í´Â °ÅÀÇ ¾øÀ½. - -¿¹¸¦ µé¾î, euc-kr ÀÎÄÚµùÀ¸·Î µÈ ÆÄÀÏÀ» UTF-8·Î º¯È¯ÇÏ·Á¸é ´ÙÀ½°ú -°°ÀÌ ÇÏ¸é µË´Ï´Ù. - - - perl -Mencoding=euc-kr,STDOUT,utf8 -pe1 < file.euckr > file.utf8 - -¿ªº¯È¯Àº ´ÙÀ½°ú °°ÀÌ ÇÒ ¼ö ÀÖ½À´Ï´Ù. - - perl -Mencoding=utf8,STDOUT,euc-kr -pe1 < file.utf8 > file.euckr - -ÀÌ·± º¯È¯À» Á»´õ Æí¸®ÇÏ°Ô ÇÒ ¼ö ÀÖµµ·Ï Encode ¸ðµâÀ» ½á¼­ -¼ø¼öÇÏ°Ô Perl·Î¸¸ ¾²ÀÎ piconv°¡ Perl¿¡ µé¾î ÀÖ½À´Ï´Ù. -±× À̸§¿¡¼­ ¾Ë ¼ö ÀÖµíÀÌ piconv´Â Unix¿¡ ÀÖ´Â iconv¸¦ -¸ðµ¨·Î ÇÑ °ÍÀÔ´Ï´Ù. ±× »ç¿ë¹ýÀº ¾Æ·¡¿Í °°½À´Ï´Ù. - - piconv -f FOO -t utf8 < file.euckr > file.utf8 - piconv -f utf8 -t FOO < file.utf8 > file.euckr - -¶Ç, 'encoding' ¸ðµâÀ» ½á¼­ Çѱ¹¾î ÀÎÄÚµùÀ» ¾²¸é¼­ ±ÛÀÚ ´ÜÀ§ -(¹ÙÀÌÆ® ´ÜÀ§°¡ ¾Æ´Ï¶ó) 󸮸¦ ½±°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù. - - #!/usr/local/bin/perl - - use encoding 'euc-kr', STDIN => 'euc-kr', - STDOUT-> 'euc-kr', STDERR=>'euc-kr'; - - print length("°¡³ª"); # 2 (Å« µû¿ÈÇ¥´Â ±ÛÀÚ ´ÜÀ§ 󸮸¦ Áö½Ã) - print length('°¡³ª'); # 4 (ÀÛÀº µû¿ÈÇ¥´Â ¹ÙÀÌÆ® ´ÜÀ§ 󸮸¦ Áö½Ã) - print index("ÇÑ°­, ´ëµ¿°­", "¿°"); # -1 ('¿°'ÀÌ ¾øÀ½) - print index('ÇÑ°­, ´ëµ¿°­', '¿°'); # 7 (8¹ø°¿Í 9¹ø° ¹ÙÀÌÆ®°¡ '¿°'ÀÇ - Äڵ尪°ú ÀÏÄ¡ÇÔ.) - - -=head2 ´õ ÀÚ¼¼È÷ ¾Ë°í ½ÍÀ¸¸é... - -PerlÀ» ¼³Ä¡ÇÏ¸é ´ë´ÜÈ÷ ÀÚ¼¼ÇÑ ¹®¼­°¡ °°ÀÌ µû¶ó ¿À¸ç, ÀÌ ¹®¼­¸¦ ÅëÇØ -Perl Àü¹Ý »Ó ¾Æ´Ï¶ó À¯´ÏÄÚµå Áö¿ø, EncodeÀÇ »ç¿ë¹ý µî¿¡ ¸¹Àº °ÍÀ» -¹è¿ï ¼ö ÀÖ½À´Ï´Ù. ºÒÇàÈ÷µµ ÀÌ ¹®¼­´Â ÇöÀç ¸ðµÎ ¿µ¾î·Î ¾²¿© ÀÖ½À´Ï´Ù. -ÀÌ ¹®¼­ ¿Ü¿¡µµ ´ÙÀ½°ú °°Àº ÀÚ·á°¡ ÀÖ½À´Ï´Ù. ÀÌ ¸ñ·ÏÀº °áÄÚ -¿ÏÀüÇÑ °ÍÀÌ ¾Æ´Ï°í ÀϺΠ´ëÇ¥ÀûÀÎ °Í¸¸ ¸ðÀº °ÍÀÔ´Ï´Ù. - - -=head2 Perl °ü·Ã ÀÚ·á - -=over 4 - -=item L - - O'ReillyÀÇ Perl À¥ ÆäÀÌÁö - -=item L - - Comprehensive Perl Archive Network - -=item L - - Perl ¸ÞÀϸµ ¸®½ºÆ®. ¸¹Àº ¸®½ºÆ® °¡¿îµ¥ - perl-unicode¿¡¼­ 'Encode'¿¡ ´ëÇØ ³íÀÇÇÔ. - -=back - -=head2 PerlÀ» ´õ ±í°Ô °øºÎÇϴµ¥ µµ¿òÀ» ÁÙ ¼ö ÀÖ´Â Çѱ¹¾î °ü·Ã »çÀÌÆ® - -=over 4 - -=item L - - O'Reilly¿¡¼­ ³ª¿Â Çѱ¹¾î Perl ¼­Àû ¸ñ·Ï - -=item L - - Perl¿¡ °ü·ÃµÈ CGI, DB, ¿¬µ¿ µî¿¡ ´ëÇÑ Á¤º¸ ¹× ´º½º Á¦°ø - -=back - -=head2 À¯´ÏÄÚµå °ü·Ã ÀÚ·á - -=over 4 - -=item L - - À¯´ÏÄÚµå ÄÁ¼Ò½Ã¾ö. - -=item L - -±âº»ÀûÀ¸·Î Unicode¿Í °°Àº ISO Ç¥ÁØÀÎ ISO/IEC 10646 UCS(Universal -Character Set)À» ¸¸µå´Â ISO/IEC JTC1/SC2/WG2ÀÇ À¥ ÆäÀÌÁö. - -=item L - - À¯´Ð½º/¸®´ª½º¿¡¼­ À¯´ÏÄÚµå¿Í UTF-8 »ç¿ë¿¡ ´ëÇÑ ¹®´äÁý(FAQ) - -=item L - - À¯´Ð½º/¸®´ª½º¿¡¼­ À¯´ÏÄÚµå¿Í UTF-8 »ç¿ë¿¡ ´ëÇÑ ¹®´äÁý(FAQ)ÀÇ Çѱ¹¾î ¹ø¿ª - -=back - -=head1 AUTHORS - -Jarkko Hietaniemi Ejhi@iki.fiE -½ÅÁ¤½Ä Ejshin@mailaps.org - -=cut +If you read this file _as_is_, just ignore the funny characters you +see. It is written in the POD format (see perlpod manpage) which is +specially designed to be readable as is. + +This file is in Korean encoded in EUC-KR. + +ÀÌ ¹®¼­¸¦ perldocÀ» ½á¼­ º¸Áö ¾Ê°í Á÷Á¢ º¸´Â °æ¿ì¿¡´Â °¢ ºÎºÐÀÇ +¿ªÇÒÀ» Ç¥½ÃÇϱâ À§ÇØ ¾²ÀÎ =head, =item, 'L' µîÀº ¹«½ÃÇϽʽÿÀ. +ÀÌ ¹®¼­´Â µû·Î perldocÀ» ¾²Áö ¾Ê°í º¸´õ¶óµµ Àдµ¥ º° ÁöÀåÀÌ +¾ø´Â POD Çü½ÄÀ¸·Î Â¥¿© ÀÖ½À´Ï´Ù. ´õ ÀÚ¼¼ÇÑ °ÍÀº perlpod +¸Å´º¾óÀ» Âü°íÇϽʽÿÀ. + + +=head1 NAME + +perlko - Perl°ú Çѱ¹¾î ÀÎÄÚµù + +=head1 DESCRIPTION + +PerlÀÇ ¼¼°è¿¡ ¿À½Å °ÍÀ» ȯ¿µÇÕ´Ï´Ù ! + + +PerlÀº 5.8.0ÆǺÎÅÍ À¯´ÏÄÚµå/ISO 10646¿¡ ´ëÇÑ ±¤¹üÀ§ÇÑ Áö¿øÀ» ÇÕ´Ï´Ù. +À¯´ÏÄÚµå Áö¿øÀÇ ÀÏȯÀ¸·Î ÇÑÁßÀÏÀ» ºñ·ÔÇÑ ¼¼°è °¢±¹¿¡¼­ +À¯´ÏÄÚµå ÀÌÀü¿¡ ¾²°í ÀÖ¾ú°í Áö±Ýµµ ³Î¸® ¾²ÀÌ°í ÀÖ´Â ¼ö¸¹Àº ÀÎÄÚµùÀ» +Áö¿øÇÕ´Ï´Ù. À¯´ÏÄÚµå´Â Àü ¼¼°è¿¡¼­ ¾²ÀÌ´Â ¸ðµç ¾ð¾î¸¦ À§ÇÑ Ç¥±â ü°è - +À¯·´ÀÇ ¶óƾ ¾ËÆĺª, Å°¸± ¾ËÆĺª, ±×¸®½º ¾ËÆĺª, Àεµ¿Í µ¿³² ¾Æ½Ã¾ÆÀÇ +ºê¶ó¹Ì °è¿­ ½ºÅ©¸³Æ®, ¾Æ¶ø ¹®ÀÚ, È÷ºê¸® ¹®ÀÚ, ÇÑÁßÀÏÀÇ ÇÑÀÚ, Çѱ¹¾îÀÇ ÇѱÛ, +ÀϺ»¾îÀÇ °¡³ª, ºÏ¹Ì Àεð¾ÈÀÇ Ç¥±â ü°è µî- ¼ö¿ëÇÏ´Â °ÍÀ» ¸ñÇ¥·Î ÇÏ°í +Àֱ⠶§¹®¿¡ ±âÁ¸¿¡ ¾²ÀÌ´ø °¢ ¾ð¾î ¹× ±¹°¡ ±×¸®°í ¿î¿µ ü°è¿¡ °íÀ¯ÇÑ +¹®ÀÚ ÁýÇÕ°ú ÀÎÄÚµùÀ» ¸ðµÎ Æ÷°ýÇÏ°í ÀÖ½À´Ï´Ù. + + +PerlÀº ³»ºÎÀûÀ¸·Î À¯´ÏÄڵ带 ¹®ÀÚ Ç¥ÇöÀ» À§ÇØ »ç¿ëÇÕ´Ï´Ù. º¸´Ù ±¸Ã¼ÀûÀ¸·Î +¸»Çϸé Perl ½ºÅ©¸³Æ® ¾È¿¡¼­ UTF-8 ¹®ÀÚ¿­À» ¾µ ¼ö ÀÖ°í, +°¢Á¾ ÇÔ¼ö¿Í ¿¬»êÀÚ(¿¹¸¦ µé¾î, Á¤±Ô½Ä, index, substr)°¡ ¹ÙÀÌÆ® ´ÜÀ§ +´ë½Å À¯´ÏÄÚµå ±ÛÀÚ ´ÜÀ§·Î µ¿ÀÛÇÕ´Ï´Ù. (´õ ÀÚ¼¼ÇÑ °ÍÀº +perlunicode ¸Å´º¾óÀ» Âü°íÇϽʽÿÀ.) À¯´ÏÄڵ尡 ³Î¸® º¸±ÞµÇ±â Àü¿¡ +³Î¸® ¾²ÀÌ°í ÀÖ¾ú°í, ¿©ÀüÈ÷ ³Î¸® ¾²ÀÌ°í ÀÖ´Â °¢±¹/°¢ ¾ð¾îº° ÀÎÄÚµùÀ¸·Î +ÀÔÃâ·ÂÀ» ÇÏ°í À̵é ÀÎÄÚµùÀ¸·Î µÈ µ¥ÀÌÅÍ¿Í ¹®¼­¸¦ ´Ù·ç´Â °ÍÀ» µ½±â À§ÇØ +'Encode'°¡ ¾²¿´½À´Ï´Ù. ¹«¾ùº¸´Ù 'Encode'¸¦ ½á¼­ ¼ö¸¹Àº ÀÎÄÚµù »çÀÌÀÇ +º¯È¯À» ½±°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù. + +'Encode'´Â ´ÙÀ½°ú °°Àº Çѱ¹¾î ÀÎÄÚµùÀ» Áö¿øÇÕ´Ï´Ù. + + euc-kr : US-ASCII¿Í KS X 1001À» °°ÀÌ ¾²´Â ¸ÖƼ¹ÙÀÌÆ® ÀÎÄÚµù + (ÈçÈ÷ ¿Ï¼ºÇüÀ̶ó°í ºÒ¸².) KS X 2901°ú RFC 1557 Âü°í. + cp949 : MS-Windows 9x/ME¿¡¼­ ¾²ÀÌ´Â È®Àå ¿Ï¼ºÇü. + euc-kr¿¡ 8,822ÀÚÀÇ ÇÑ±Û À½ÀýÀ» ´õÇÑ °ÍÀÓ. + alias´Â uhc, windows-949, x-windows-949, + ks_c_5601-1987. ¸Ç ¸¶Áö¸· À̸§Àº ÀûÀýÇÏÁö ¾ÊÀº + À̸§ÀÌÁö¸¸, Microsoft Á¦Ç°¿¡¼­ CP949ÀÇ Àǹ̷Π+ ¾²ÀÌ°í ÀÖÀ½. + johab : KS X 1001:1998 ºÎ·Ï 3¿¡¼­ ±ÔÁ¤ÇÑ Á¶ÇÕÇü. + ¹®ÀÚ ·¹ÆÛÅ丮´Â cp949¿Í ¸¶Âù°¡Áö·Î US-ASCII, + KS X 1001¿¡ 8,822ÀÚÀÇ ÇÑ±Û À½ÀýÀ» ´õÇÑ °ÍÀÓ. + + iso-2022-kr : RFC 1557¿¡¼­ ±ÔÁ¤ÇÑ Çѱ¹¾î ÀÎÅÍ³Ý ¸ÞÀÏ ±³È¯¿ë ÀÎÄÚµùÀ¸·Î + US-ASCII¿Í KS X 1001À» ·¹ÆÛÅ丮·Î ÇÏ´Â Á¡¿¡¼­ + euc-kr°ú °°Áö¸¸ ÀÎÄÚµù ¹æ½ÄÀÌ ´Ù¸§. + 1997-8³â °æ±îÁö ¾²¿´À¸³ª ´õ ÀÌ»ó ¸ÞÀÏ ±³È¯¿¡ ¾²ÀÌÁö + ¾ÊÀ½. + ksc5601-raw : KS X 1001(KS C 5601)À» GL(Áï, MSB¸¦ 0À¸·Î ÇÑ °æ¿ì) + ¿¡ ³õ¾ÒÀ» ¶§ÀÇ ÀÎÄÚµù. US-ASCII¿Í °áÇÕÇÏÁö ¾Ê°í + ´Üµ¶À¸·Î ¾²ÀÌ´Â ÀÏÀº X11 µî¿¡¼­ ±Û²Ã ÀÎÄÚµù + (ksc5601.1987-0. '0'Àº GLÀ» ÀǹÌÇÔ.)À¸·Î ¾²ÀÌ´Â °ÍÀ» + Á¦¿ÜÇÏ°í´Â °ÅÀÇ ¾øÀ½. + +¿¹¸¦ µé¾î, euc-kr ÀÎÄÚµùÀ¸·Î µÈ ÆÄÀÏÀ» UTF-8·Î º¯È¯ÇÏ·Á¸é ´ÙÀ½°ú +°°ÀÌ ÇÏ¸é µË´Ï´Ù. + + + perl -Mencoding=euc-kr,STDOUT,utf8 -pe1 < file.euckr > file.utf8 + +¿ªº¯È¯Àº ´ÙÀ½°ú °°ÀÌ ÇÒ ¼ö ÀÖ½À´Ï´Ù. + + perl -Mencoding=utf8,STDOUT,euc-kr -pe1 < file.utf8 > file.euckr + +ÀÌ·± º¯È¯À» Á»´õ Æí¸®ÇÏ°Ô ÇÒ ¼ö ÀÖµµ·Ï Encode ¸ðµâÀ» ½á¼­ +¼ø¼öÇÏ°Ô Perl·Î¸¸ ¾²ÀÎ piconv°¡ Perl¿¡ µé¾î ÀÖ½À´Ï´Ù. +±× À̸§¿¡¼­ ¾Ë ¼ö ÀÖµíÀÌ piconv´Â Unix¿¡ ÀÖ´Â iconv¸¦ +¸ðµ¨·Î ÇÑ °ÍÀÔ´Ï´Ù. ±× »ç¿ë¹ýÀº ¾Æ·¡¿Í °°½À´Ï´Ù. + + piconv -f euc-kr -t utf8 < file.euckr > file.utf8 + piconv -f utf8 -t euc-kr < file.utf8 > file.euckr + +¶Ç, 'encoding' ¸ðµâÀ» ½á¼­ Çѱ¹¾î ÀÎÄÚµùÀ» ¾²¸é¼­ ±ÛÀÚ ´ÜÀ§ +(¹ÙÀÌÆ® ´ÜÀ§°¡ ¾Æ´Ï¶ó) 󸮸¦ ½±°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù. + + #!/usr/local/bin/perl + + use encoding 'euc-kr', STDIN => 'euc-kr', + STDOUT-> 'euc-kr', STDERR=>'euc-kr'; + + print length("°¡³ª"); # 2 (Å« µû¿ÈÇ¥´Â ±ÛÀÚ ´ÜÀ§ 󸮸¦ Áö½Ã) + print length('°¡³ª'); # 4 (ÀÛÀº µû¿ÈÇ¥´Â ¹ÙÀÌÆ® ´ÜÀ§ 󸮸¦ Áö½Ã) + print index("ÇÑ°­, ´ëµ¿°­", "¿°"); # -1 ('¿°'ÀÌ ¾øÀ½) + print index('ÇÑ°­, ´ëµ¿°­', '¿°'); # 7 (8¹ø°¿Í 9¹ø° ¹ÙÀÌÆ®°¡ '¿°'ÀÇ + Äڵ尪°ú ÀÏÄ¡ÇÔ.) + + +=head2 ´õ ÀÚ¼¼È÷ ¾Ë°í ½ÍÀ¸¸é... + +PerlÀ» ¼³Ä¡ÇÏ¸é ´ë´ÜÈ÷ ÀÚ¼¼ÇÑ ¹®¼­°¡ °°ÀÌ µû¶ó ¿À¸ç, ÀÌ ¹®¼­¸¦ ÅëÇØ +Perl Àü¹Ý »Ó ¾Æ´Ï¶ó À¯´ÏÄÚµå Áö¿ø, EncodeÀÇ »ç¿ë¹ý µî¿¡ ¸¹Àº °ÍÀ» +¹è¿ï ¼ö ÀÖ½À´Ï´Ù. ºÒÇàÈ÷µµ ÀÌ ¹®¼­´Â ÇöÀç ¸ðµÎ ¿µ¾î·Î ¾²¿© ÀÖ½À´Ï´Ù. +ÀÌ ¹®¼­ ¿Ü¿¡µµ ´ÙÀ½°ú °°Àº ÀÚ·á°¡ ÀÖ½À´Ï´Ù. ÀÌ ¸ñ·ÏÀº °áÄÚ +¿ÏÀüÇÑ °ÍÀÌ ¾Æ´Ï°í ÀϺΠ´ëÇ¥ÀûÀÎ °Í¸¸ ¸ðÀº °ÍÀÔ´Ï´Ù. + + +=head2 Perl °ü·Ã ÀÚ·á + +=over 4 + +=item L + + O'ReillyÀÇ Perl À¥ ÆäÀÌÁö + +=item L + + Comprehensive Perl Archive Network + +=item L + + Perl ¸ÞÀϸµ ¸®½ºÆ®. ¸¹Àº ¸®½ºÆ® °¡¿îµ¥ + perl-unicode¿¡¼­ 'Encode'¿¡ ´ëÇØ ³íÀÇÇÔ. + +=back + +=head2 PerlÀ» ´õ ±í°Ô °øºÎÇϴµ¥ µµ¿òÀ» ÁÙ ¼ö ÀÖ´Â Çѱ¹¾î °ü·Ã »çÀÌÆ® + +=over 4 + +=item L + + Perl Çѱ¹ »ç¿ëÀÚ ¸ðÀÓ + +=item L + + Çѱ¹¾î Perl ´º½º ±×·ì + +=item L + + Perl ¸Á°Å½º (¼­¿ï) + +=item L + + Home for Korean Perlmanias + +=item L + + O'Reilly¿¡¼­ ³ª¿Â Çѱ¹¾î Perl ¼­Àû ¸ñ·Ï + +=item L + + Perl ±âÃÊ °­Á ¹× ¼Ò½º, ÃÖ±Ù µ¿Çâ, °ü·Ã ÇØ¿Ü »çÀÌÆ® ¸µÅ© + +=item L + + Perl¿¡ °ü·ÃµÈ CGI, DB, ¿¬µ¿ µî¿¡ ´ëÇÑ Á¤º¸ ¹× ´º½º Á¦°ø + +=back + +=head2 À¯´ÏÄÚµå °ü·Ã ÀÚ·á + +=over 4 + +=item L + + À¯´ÏÄÚµå ÄÁ¼Ò½Ã¾ö. + +=item L + +±âº»ÀûÀ¸·Î Unicode¿Í °°Àº ISO Ç¥ÁØÀÎ ISO/IEC 10646 UCS(Universal +Character Set)À» ¸¸µå´Â ISO/IEC JTC1/SC2/WG2ÀÇ À¥ ÆäÀÌÁö. + +=item L + + À¯´Ð½º/¸®´ª½º¿¡¼­ À¯´ÏÄÚµå¿Í UTF-8 »ç¿ë¿¡ ´ëÇÑ ¹®´äÁý(FAQ) + +=item L + + À¯´Ð½º/¸®´ª½º¿¡¼­ À¯´ÏÄÚµå¿Í UTF-8 »ç¿ë¿¡ ´ëÇÑ ¹®´äÁý(FAQ)ÀÇ Çѱ¹¾î ¹ø¿ª + +=back + +=head1 AUTHORS + +Jarkko Hietaniemi Ejhi@iki.fiE +½ÅÁ¤½Ä Ejshin@mailaps.org + +=cut diff --git a/README.tw b/README.tw index 02c0d4e..698b5d7 100644 --- a/README.tw +++ b/README.tw @@ -4,9 +4,9 @@ specially designed to be readable as is. The following documentation is written in Big5 encoding. -¦pªG§A¥Î¤@¯ëªº¤å¦r½s¿è¾¹¾\Äý³o¥÷¤å¥ó, ½Ð©¿²¤¤å¤¤©_¯Sªºµù°O¦r²Å. ³o¥÷¤å -¥ó¬O¥H POD (²©ú¤å¥ó®æ¦¡) ¼g¦¨; ³oºØ®æ¦¡¬O¬°¤F¯àÅý¤Hª½±µÅª¨ú¦Ó¯S§O³]­p -ªº. Ãö©ó¦¹®æ¦¡ªº¶i¤@¨B¸ê°T, ½Ð°Ñ¦Ò perlpod ½u¤W¤å¥ó. +¦pªG§A¥Î¤@¯ëªº¤å¦r½s¿è¾¹¾\Äý³o¥÷¤å¥ó, ½Ð©¿²¤¤å¤¤©_¯Sªºµù°O¦r²Å. +³o¥÷¤å¥ó¬O¥H POD (²©ú¤å¥ó®æ¦¡) ¼g¦¨; ³oºØ®æ¦¡¬O¬°¤F¯àÅý¤Hª½±µÅª¨ú, +¦Ó¯S§O³]­pªº. Ãö©ó¦¹®æ¦¡ªº¶i¤@¨B¸ê°T, ½Ð°Ñ¦Ò perlpod ½u¤W¤å¥ó. =head1 NAME @@ -16,20 +16,20 @@ perltw - Åwªï¨Ó¨ì Perl ªº¤Ñ¦a! -±q 5.8.0 ª©¶}©l, Perl ¨ã³Æ¤F¸ÔºÉªº Unicode (¸U°ê½X) ¤ä´©, ¤]³s±a¤ä´©¤F -³\¦h©Ô¤B»y¨t¥H¥~ªº½s½X¤è¦¡; CJK (¤¤¤éÁú) «K¬O¨ä¤¤ªº¤@³¡¥÷. Unicode ¬O -°ê»Ú©Êªº¼Ð·Ç, ¸Õ¹Ï²[»\¥@¬É¤W©Ò¦³ªº¦r²Å: ¦è¤è¥@¬É, ªF¤è¥@¬É, ¥H¤Î¨âªÌ¶¡ -ªº¤@¤Á (§Æþ¤å, ±Ô§Q¨È¤å, ªü©Ô§B¤å, §Æ§B¨Ó¤å, ¦L«×¤å, ¦L¦a¦w¤å, µ¥µ¥). -¥¦¤]®e¯Ç¤F¦hºØ§@·~¨t²Î»P¥­»O (¦p PC ¤Î³Áª÷¶ð). +±q 5.8.0 ª©¶}©l, Perl ¨ã³Æ¤F§¹µ½ªº Unicode (¸U°ê½X) ¤ä´©, +¤]³s±a¤ä´©¤F³\¦h©Ô¤B»y¨t¥H¥~ªº½s½X¤è¦¡; CJK (¤¤¤éÁú) «K¬O¨ä¤¤ªº¤@³¡¥÷. +Unicode ¬O°ê»Ú©Êªº¼Ð·Ç, ¸Õ¹Ï²[»\¥@¬É¤W©Ò¦³ªº¦r²Å: ¦è¤è¥@¬É, ªF¤è¥@¬É, +¥H¤Î¨âªÌ¶¡ªº¤@¤Á (§Æþ¤å, ±Ô§Q¨È¤å, ªü©Ô§B¤å, §Æ§B¨Ó¤å, ¦L«×¤å, +¦L¦a¦w¤å, µ¥µ¥). ¥¦¤]®e¯Ç¤F¦hºØ§@·~¨t²Î»P¥­»O (¦p PC ¤Î³Áª÷¶ð). 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¡uEncode¡v³o­Ó¼Ò²Õ, ¥i¥HÅý§A»´©ö¦aŪ¨ú¤Î¼g¤J¦³ªº½s½X¸ê®Æ. +ªí¥Ü; 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 ½s½X + big5 ­ì©lªº Big5 ½s½X (§t­Ê¤Ñ¤é¤å¦r§Î) big5-hkscs Big5 + ­»´ä¥~¦r¶° cp950 ¦r½X­¶ 950 (Big5 + ·L³n²K¥[ªº¦r²Å) @@ -37,8 +37,7 @@ Encode perl -Mencoding=big5,STDOUT,utf8 -pe1 < file.big5 > file.utf8 -Perl ¤]¤ºªþ¤F¡upiconv¡v, ¤@¤ä§¹¥þ¥H Perl ¼g¦¨ªº¦r²ÅÂà´«¤u¨ãµ{¦¡, ¥Îªk -¦p¤U: +Perl ¤]¤ºªþ¤F "piconv", ¤@¤ä§¹¥þ¥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 @@ -47,13 +46,15 @@ Perl #!/usr/bin/env perl # ±Ò°Ê big5 ¦r¦ê¸ÑªR; ¼Ð·Ç¿é¥X¤J¤Î¼Ð·Ç¿ù»~³£³]¬° big5 ½s½X - use encoding 'big5', STDIN => 'big5', - STDOUT => 'big5', STDERR => 'big5'; - + 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­Ó¦r¸`¶}©l) + print index('½Î½Î±Ð»£', 'να'); # 1 (±q²Ä¤G­Ó¦ì¤¸²Õ¶}©l) + +¦b³Ì«á¤@¦C¨Ò¤l¸Ì, "½Î" ªº²Ä¤G­Ó¦ì¤¸²Õ»P "½Î" ªº²Ä¤@­Ó¦ì¤¸²Õµ²¦X¦¨ Big5 +½Xªº "ν"; "½Î" ªº²Ä¤G­Ó¦ì¤¸²Õ«h»P "±Ð" ªº²Ä¤@­Ó¦ì¤¸²Õµ²¦X¦¨ "α". +³o¸Ñ¨M¤F¥H«e Big5 ½X¤ñ¹ï³B²z¤W±`¨£ªº°ÝÃD. =head2 ÃB¥~ªº¤¤¤å½s½X @@ -66,14 +67,18 @@ Encode::HanExtra ¥t¥~, Encode::HanConvert ¼Ò²Õ«h´£¨Ñ¤F²ÁcÂà´«¥Îªº¨âºØ½s½X: big5-simp Big5 ¥¿Å餤¤å»P Unicode ²Å餤¤å¤¬Âà - gbk-trad GBK ²Å餤¤å»P Unicode ÁcÅ餤¤å¤¬Âà + gbk-trad GBK ²Å餤¤å»P Unicode ¥¿Å餤¤å¤¬Âà + +­Y·Q¦b GBK »P Big5 ¤§¶¡¤¬Âà, ½Ð°Ñ¦Ò¸Ó¼Ò²Õ¤ºªþªº b2g.pl »P g2b.pl ¨â¤äµ{¦¡, +©Î¦bµ{¦¡¤º¨Ï¥Î¤U¦C¼gªk: -­Y·Q¦b GBK »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 =head2 ¶i¤@¨Bªº¸ê°T -½Ð°Ñ¦Ò Perl ¤ºªþªº¤j¶q»¡©ú¤å¥ó (¤£©¯¥þ¬O¥Î­^¤å¼gªº) , ¨Ó¾Ç²ß§ó¦hÃö©ó +½Ð°Ñ¦Ò Perl ¤ºªþªº¤j¶q»¡©ú¤å¥ó (¤£©¯¥þ¬O¥Î­^¤å¼gªº), ¨Ó¾Ç²ß§ó¦hÃö©ó Perl ªºª¾ÃÑ, ¥H¤Î Unicode ªº¨Ï¥Î¤è¦¡. ¤£¹L, ¥~³¡ªº¸ê·½¬Û·íÂ×´I: =head2 ´£¨Ñ Perl ¸ê·½ªººô§} @@ -134,8 +139,26 @@ Unicode Unix/Linux ¤Wªº UTF-8 ¤Î Unicode µª«È°Ý +=head2 ¤¤¤å¤Æ¸ê°T + +=item ¬°¤°»ò¥s "¥¿Å餤¤å" ¤£¥s "ÁcÅ餤¤å"? + +L + +=item ¤¤¤å¤Æ³nÅéÁp·ù + +L + +=item Linux ³nÅ餤¤å¤Æ­p¹º + +L + =back +=head1 SEE ALSO + +L, L, L, L, L + =head1 AUTHORS Jarkko Hietaniemi Ejhi@iki.fiE