[問題] Unicode轉字串

看板Perl作者 (retreat)時間16年前 (2008/05/06 21:14), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/5 (看更多)
我想把16進位顯示的unicode轉為字串顯示 例如: 6F225821 -> 漢堡 我試了幾個方法都沒有用 想請問各位前輩有沒有人知道該怎麼做的 目前是在windows底下測試 print encode("iso-8859-3",decode('utf-8', "0x6F22")); print encode("Big5",decode('utf-8', "0x6F22")); 結果直接輸出 0x6F22 請問該怎麼做呢? -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.71.94.1 ※ 編輯: LinusChen 來自: 203.71.94.1 (05/06 21:14)
文章代碼(AID): #1885cWi5 (Perl)
文章代碼(AID): #1885cWi5 (Perl)