In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/d7b1992c319ddbf79fcc2993f49c7505117a1c10?hp=86e39d7d2858df4e45eac192041d5cb3bd87000e>
- Log ----------------------------------------------------------------- commit d7b1992c319ddbf79fcc2993f49c7505117a1c10 Author: Ricardo Signes <[email protected]> Date: Sun Jun 9 11:37:13 2013 -0400 tweak perltw.pod for long lines (and default exports) M README.tw commit 55b2202a0b15ebd89f84702a6f1bcc7c9916e337 Author: Ricardo Signes <[email protected]> Date: Sun Jun 9 11:33:57 2013 -0400 add gugod to the AUTHORS file M AUTHORS commit e4ea3144e7562f41ab3b755f54a45486aec9aa99 Author: Kang-min Liu <[email protected]> Date: Sat May 11 20:00:53 2013 +0200 Remove references of "encoding" module in README.tw M README.tw ----------------------------------------------------------------------- Summary of changes: AUTHORS | 1 + README.tw | 20 ++++++++------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/AUTHORS b/AUTHORS index 39f36d4..436d3d6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -624,6 +624,7 @@ John E. Malmberg <[email protected]> Jörg Walter <[email protected]> José Pedro Oliveira <[email protected]> Ka-Ping Yee <[email protected]> +Kang-min Liu <[email protected]> Kaoru Maeda <[email protected]> Karen Etheridge <[email protected]> Karl Glazebrook <[email protected]> diff --git a/README.tw b/README.tw index 2a4dcf5..5944bd8 100644 --- a/README.tw +++ b/README.tw @@ -31,26 +31,22 @@ Encode å»¶ä¼¸æ¨¡çµæ¯æ´ä¸åæ£é«ä¸æç編碼æ¹å¼ ('big5' 表示 'big5- èä¾ä¾èªª, å° Big5 ç·¨ç¢¼çæªæ¡è½æ Unicode, ç¥ééµå ¥ä¸åæä»¤: - perl -Mencoding=big5,STDOUT,utf8 -pe1 < file.big5 > file.utf8 + perl -MEncode -pe '$_= encode( utf8 => decode( big5 => $_ ) )' \ + < file.big5 > file.utf8 Perl ä¹å §éäº "piconv", 䏿¯å®å ¨ä»¥ Perl 寫æçåç¬¦è½æå·¥å ·ç¨å¼, ç¨æ³å¦ä¸: piconv -f big5 -t utf8 < file.big5 > file.utf8 piconv -f utf8 -t big5 < file.utf8 > file.big5 -å¦å¤, å©ç¨ encoding 模çµ, ä½ å¯ä»¥è¼æå¯«åºä»¥å符çºå®ä½çç¨å¼ç¢¼, å¦ä¸æç¤º: +å¦å¤ï¼è¥ç¨å¼ç¢¼æ¬èº«ä»¥ utf8 編碼å²åï¼é åä½¿ç¨ utf8 模çµï¼å¯è®ç¨å¼ç¢¼ä¸å串以åå ¶é +ç®ç以å符çºå®ä½ï¼èä¸ä»¥ä½å çºå®ä½ï¼å¦ä¸æç¤ºï¼ #!/usr/bin/env perl - # åå big5 å串解æ; æ¨æºè¼¸åºå ¥åæ¨æºé¯èª¤é½è¨çº big5 編碼 - use encoding 'big5', STDIN => 'big5', STDOUT => 'big5'; - print length("é§±é§"); # 2 (éå¼è表示å符) - print length('é§±é§'); # 4 (å®å¼è表示ä½å çµ) - print index("è«è«æèª¨", "å½å¸¢"); # -1 (ä¸å 嫿¤åå串) - print index('è«è«æèª¨', 'å½å¸¢'); # 1 (å¾ç¬¬äºåä½å çµéå§) + use utf8; + print length("é§±é§"); # 2 (䏿¯ 6) + print index("è«è«æèª¨", "æèª¨"); # 2 (å¾ 0 èµ·ç®ç¬¬ 2 åå符) -卿å¾ä¸åä¾å裡, "è«" ç第äºåä½å çµè "è«" ç第ä¸åä½å çµçµåæ Big5 -碼ç "å½"; "è«" ç第äºåä½å çµåè "æ" ç第ä¸åä½å çµçµåæ "帢". -é解決äºä»¥å Big5 碼æ¯å°èçä¸å¸¸è¦çåé¡. =head2 é¡å¤çä¸æç·¨ç¢¼ @@ -155,7 +151,7 @@ L<http://www.linux.org.tw/CLDP/> =head1 SEE ALSO -L<Encode>, L<Encode::TW>, L<encoding>, L<perluniintro>, L<perlunicode> +L<Encode>, L<Encode::TW>, L<perluniintro>, L<perlunicode> =head1 AUTHORS -- Perl5 Master Repository
