看板 [ Perl ]
討論串[問題] 特殊的中文字
共 6 篇文章
首頁
上一頁
1
2
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者irenec (nickname)時間21年前 (2003/09/08 18:45), 編輯資訊
1
0
1
內容預覽:
含有「許」這個字的字串(我的狀況是用 Text::ParseWords解CSV檔得出欄位). 會亂掉, 無法再作處理, 錯誤訊息似乎是多了一個Backslash. 但用RE濾並不work... 請問該怎麼解決呢 ? 謝謝... --. irene's page http://www.irenepag

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者littleshan (我要加入劍道社!)時間21年前 (2003/09/08 23:27), 編輯資訊
1
0
0
內容預覽:
轉成utf8...是個方法. 不曉得你想要做怎樣的處理?. --. --. 發信站: 批踢踢實業坊(ptt.csie.ntu.edu.tw). ◆ From: 140.112.244.211.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者irenec (nickname)時間21年前 (2003/09/09 10:42), 編輯資訊
1
0
1
內容預覽:
我做了這樣的測試:. use Encode;. use Text::ParseWords;. open (SRC,"test.txt");. while(<SRC>){. chomp;. $data = encode("utf8", $_);. @words = &parse_line('\,',
(還有135個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者littleshan (我要加入劍道社!)時間21年前 (2003/09/09 12:13), 編輯資訊
1
0
0
內容預覽:
試試. use utf8;. open (SRC, "test.txt");. binmode (SRC, ":encoding(big5)"). binmode (SRC, ":encoding(big5)"). 這樣子你就不需要encode和decode. $_的內容似乎是utf8 encodi

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者irenec (nickname)時間21年前 (2003/09/09 14:42), 編輯資訊
0
0
1
內容預覽:
謝謝... 我把code改成:. use Text::ParseWords;. use utf16;. open (SRC,"test.txt"); #text.txt的內容是 "許正雄","名字許正雄". binmode (SRC ":encoding(big5)");. while(<SRC>)
(還有221個字)
首頁
上一頁
1
2
下一頁
尾頁