作者come (come come )
看板AndroidDev
標題Re: [問題] 請問big5編碼
時間Thu Sep 6 13:34:59 2012
1F:→ tericky:為什麼回應字串要轉編碼兩次??? 01/16 21:48
2F:→ tericky:既然已經知道source是big5,要轉成UTF-8,直接 01/16 21:49
3F:→ tericky:strRet = new String( 01/16 21:51
4F:→ tericky: EntityUtils.toString(response.getEntity()) 01/16 21:52
5F:→ tericky: .getBytes("ISO-8859-1"), "UTF-8") 01/16 21:52
6F:→ tericky:至於>、<、&這種特殊符號,除了tag以外,都要自己轉換格式 01/16 21:54
我用上面的寫法但是有些字元會是亂碼,顯示成"?"
例如千年國=>千 國
請問有比較好的解法嗎?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.147.141.118