X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=README.cn;h=8f03927ee86d298920e95b627502a213de91c11e;hb=698020e13f7d895852858e436ca60023dbfe6077;hp=11b587564b510f5412187b84cd207abced2ba760;hpb=f092799b3cc7692539f53c1932a8808058335e26;p=p5sagit%2Fp5-mst-13.2.git diff --git a/README.cn b/README.cn index 11b5875..8f03927 100644 --- a/README.cn +++ b/README.cn @@ -4,8 +4,8 @@ specially designed to be readable as is. The following documentation is written in EUC-CN encoding. -Èç¹ûÄãÓÃÒ»°ãµÄÎÄ×ֱ༭Æ÷ÔÄÀÀÕâ·ÝÎļþ, ÇëºöÂÔÎÄÖÐÆæÌصÄ×¢¼Ç×Ö·û. -Õâ·ÝÎļþÊÇÒÔ POD (¼òÃ÷Îļþ¸ñʽ) д³É; ÕâÖÖ¸ñʽÊÇΪÁËÄÜÈÃÈËÖ±½Ó¶ÁÈ¡, +?ç¹?ÄãÓÃÒ»°ãµÄÎÄ×ֱ༭Æ÷ÔÄÀÀÕâ·ÝÎļþ, ÇëºöÂÔÎÄÖÐÆæÌصÄ×¢¼Ç×Ö·û. +Õâ·ÝÎļþÊÇÒÔ POD (¼òÃ÷Îļþ¸ñʽ) д³É; ÕâÖÖ¸ñʽÊÇΪÁËÄÜ?ÃÈËÖ±½Ó¶ÁÈ?, ¶øÌرðÉè¼ÆµÄ. ¹ØÓڴ˸ñʽµÄ½øÒ»²½ÐÅÏ¢, Çë²Î¿¼ perlpod ÏßÉÏÎļþ. =head1 NAME @@ -17,51 +17,51 @@ perlcn - »¶Ó­À´µ½ Perl µÄÌìµØ! ´Ó 5.8.0 °æ¿ªÊ¼, Perl ¾ß±¸ÁËÍêÉÆµÄ Unicode (ͳһÂë) Ö§Ô®, -Ò²Á¬´øÖ§Ô®ÁËÐí¶àÀ­¶¡ÓïϵÒÔÍâµÄ±àÂ뷽ʽ; CJK (ÖÐÈÕº«) ±ãÊÇÆäÖеÄÒ»²¿·Ý. +Ò²Á¬´øÖ§Ô®ÁËÐí¶àÀ­¶¡ÓïϵÒÔÍâµÄ±àÂ뷽ʽ; CJK (ÖÐ?Õº?) ±ãÊÇÆäÖеÄÒ»²¿·Ý. Unicode Êǹú¼ÊÐԵıê×¼, ÊÔͼº­¸ÇÊÀ½çÉÏËùÓеÄ×Ö·û: Î÷·½ÊÀ½ç, ¶«·½ÊÀ½ç, ÒÔ¼°Á½Õß¼äµÄÒ»ÇÐ (Ï£À°ÎÄ, ÐðÀûÑÇÎÄ, ÑÇÀ­²®ÎÄ, Ï£²®À´ÎÄ, Ó¡¶ÈÎÄ, -Ó¡µØ°²ÎÄ, µÈµÈ). ËüÒ²ÈÝÄÉÁ˶àÖÖ×÷ҵϵͳÓëƽ̨ (Èç PC ¼°Âó½ðËþ). +Ó¡µØ°²ÎÄ, µÈµÈ). ËüÒ²?ÝÄÉÁ˶àÖÖ×÷ҵϵͳÓëƽÌ? (?? PC ¼°Âó½ðËþ). Perl ±¾ÉíÒÔ Unicode ½øÐвÙ×÷. Õâ±íʾ Perl ÄÚ²¿µÄ×Ö·û´®Êý¾Ý¿ÉÓà Unicode -±íʾ; Perl µÄº¯Ê½ÓëËã·û (ÀýÈçÕý¹æ±íʾʽ±È¶Ô) Ò²ÄÜ¶Ô Unicode ½øÐвÙ×÷. -ÔÚÊäÈë¼°Êä³öʱ, ΪÁË´¦ÀíÒÔ Unicode ֮ǰµÄ±àÂ뷽ʽ´¢´æµÄÊý¾Ý, Perl -ÌṩÁË Encode Õâ¸öÄ£¿é, ¿ÉÒÔÈÃÄãÇáÒ׵ضÁÈ¡¼°Ð´Èë¾ÉÓеıàÂëÊý¾Ý. +±íʾ; Perl µÄº¯Ê½ÓëËã·û (Àý?çÕ?¹æ±íʾʽ±È¶Ô) Ò²ÄÜ¶Ô Unicode ½øÐвÙ×÷. +ÔÚÊä?ë¼°Êä³öÊ?, ΪÁË´¦ÀíÒÔ Unicode ֮ǰµÄ±àÂ뷽ʽ´æ·ÅµÄÊý¾Ý, Perl +ÌṩÁË Encode Õâ¸öÄ£¿é, ¿ÉÒÔ?ÃÄãÇáÒ׵ضÁÈ¡¼°Ð´Èë¾ÉÓеıàÂëÊ?¾Ý. -Encode ÑÓÉìÄ£¿éÖ§Ô®ÏÂÁмòÌåÖÐÎĵıàÂ뷽ʽ: +Encode ÑÓÉìÄ£¿éÖ§Ô®ÏÂÁмòÌåÖÐÎĵıàÂ뷽ʽ ('gb2312' ±íʾ 'euc-cn'): euc-cn Unix ÑÓÉì×Ö·û¼¯, Ò²¾ÍÊÇË׳ƵĹú±êÂë - gb2312 δ¾­´¦ÀíµÄ (µÍ±ÈÌØ) GB2312 ×Ö·û±í + gb2312-raw δ¾­´¦ÀíµÄ (µÍ±ÈÌØ) GB2312 ×Ö·û±í gb12345 δ¾­´¦ÀíµÄÖйúÓ÷±ÌåÖÐÎıàÂë iso-ir-165 GB2312 + GB6345 + GB8565 + ÐÂÔö×Ö·û - cp936 ×ÖÂëÒ³ 936, Ò²³ÆΪ GBK (À©³ä¹ú±êÂë) + 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 ±àÂë + # Æô¶¯ euc-cn ×Ö´®½âÎö; ±ê×¼Êä³ö?ë¼°±ê×¼´íÎó¶¼ÉèÎ? euc-cn ±àÂë use encoding 'euc-cn', STDIN => 'euc-cn', STDOUT => 'euc-cn'; print length("ÂæÍÕ"); # 2 (Ë«ÒýºÅ±íʾ×Ö·û) - print length('ÂæÍÕ'); # 4 (µ¥ÒýºÅ±íʾλԪ×é) + print length('ÂæÍÕ'); # 4 (µ¥ÒýºÅ±íʾ×Ö½Ú) print index("×»×»½Ì»å", "»×»½"); # -1 (²»°üº¬´Ë×Ó×Ö·û´®) print index('×»×»½Ì»å', '»×»½'); # 1 (´ÓµÚ¶þ¸ö×Ö½Ú¿ªÊ¼) -ÔÚ×îºóÒ»ÁÐÀý×ÓÀï, "×»" µÄµÚ¶þ¸öλԪ×éÓë "×»" µÄµÚÒ»¸öλԪ×é½áºÏ³É EUC-CN -ÂëµÄ "»×"; "×»" µÄµÚ¶þ¸öλԪ×éÔòÓë "½Ì" µÄµÚÒ»¸öλԪ×é½áºÏ³É "»½". +ÔÚ×îºóÒ»ÁÐÀý×ÓÀï, "×»" µÄµÚ¶þ¸ö×Ö½ÚÓë "×»" µÄµÚÒ»¸ö×Ö½Ú½áºÏ³É EUC-CN +ÂëµÄ "»×"; "×»" µÄµÚ¶þ¸ö×Ö½ÚÔòÓë "½Ì" µÄµÚÒ»¸ö×Ö½Ú½áºÏ³É "»½". Õâ½â¾öÁËÒÔÇ° EUC-CN Âë±È¶Ô´¦ÀíÉϳ£¼ûµÄÎÊÌâ. =head2 ¶îÍâµÄÖÐÎıàÂë -Èç¹ûÐèÒª¸ü¶àµÄÖÐÎıàÂë, ¿ÉÒÔ´Ó CPAN (L) ÏÂÔØ +?ç¹?ÐèÒª¸ü¶àµÄÖÐÎıàÂë, ¿ÉÒÔ´Ó CPAN (L) ÏÂÔØ Encode::HanExtra Ä£¿é. ËüÄ¿Ç°ÌṩÏÂÁбàÂ뷽ʽ: gb18030 À©³ä¹ýµÄ¹ú±êÂë, °üº¬·±ÌåÖÐÎÄ @@ -71,7 +71,7 @@ Encode::HanExtra Ä£ big5-simp Big5 ·±ÌåÖÐÎÄÓë Unicode ¼òÌåÖÐÎÄ»¥×ª gbk-trad GBK ¼òÌåÖÐÎÄÓë Unicode ·±ÌåÖÐÎÄ»¥×ª -ÈôÏëÔÚ GBK Óë Big5 Ö®¼ä»¥×ª, Çë²Î¿¼¸ÃÄ£¿éÄÚ¸½µÄ b2g.pl Óë g2b.pl Á½Ö§³ÌÐò, +?ôÏëÔ? GBK Óë Big5 Ö®¼ä»¥×ª, Çë²Î¿¼¸ÃÄ£¿éÄÚ¸½µÄ b2g.pl Óë g2b.pl Á½Ö§³ÌÐò, »òÔÚ³ÌÐòÄÚʹÓÃÏÂÁÐд·¨: use Encode::HanConvert; @@ -80,7 +80,7 @@ Encode::HanExtra Ä£ =head2 ½øÒ»²½µÄÐÅÏ¢ -Çë²Î¿¼ Perl ÄÚ¸½µÄ´óÁ¿ËµÃ÷Îļþ (²»ÐÒÈ«ÊÇÓÃÓ¢ÎÄдµÄ), À´Ñ§Ï°¸ü¶à¹ØÓÚ +Çë²Î¿¼ Perl ÄÚ¸½µÄ´óÁ¿ËµÃ÷Îļþ (²»ÐÒ?«ÊÇÓÃÓ?ÎÄдµÄ), À´Ñ§Ï°¸ü¶à¹ØÓÚ Perl µÄ֪ʶ, ÒÔ¼° Unicode µÄʹÓ÷½Ê½. ²»¹ý, ÍⲿµÄ×ÊÔ´Ï൱·á¸»: =head2 Ìṩ Perl ×ÊÔ´µÄÍøÖ· @@ -143,6 +143,6 @@ L, L, L, L, L Jarkko Hietaniemi Ejhi@iki.fiE -ÌÆ×Úºº Eautrijus@autrijus.orgE +Autrijus Tang (ÌÆ×Úºº) Eautrijus@autrijus.orgE =cut