skip to main
|
skip to sidebar
Technology Note
顯示具有
轉碼
標籤的文章。
顯示所有文章
顯示具有
轉碼
標籤的文章。
顯示所有文章
2009年4月2日
編碼轉換
byte[] String.getBytes(characterset);
getBytes() 回傳 string 在該平台的預設編碼的byte array
或者使用者自行指定編碼
ex.
String a = "殺很大";
bytes[] data = a.getBytes("UTF-8");
new String(byte[], characterset);
從byte array產生Unicode字串
若擔心猜錯byte array的編碼
則字行指定 characterset
較舊的文章
首頁
訂閱:
文章 (Atom)
Plurk.com
Plurk.com
追蹤者
網誌存檔
▼
2011
(1)
▼
5月
(1)
無標題
►
2009
(9)
►
9月
(2)
►
6月
(1)
►
5月
(2)
►
4月
(3)
►
3月
(1)
關於我自己
WeiTehChen
檢視我的完整簡介