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

Reply via email to