java String字串陣列轉utf8編碼
private String[] toUTF8(String[] input)
{
String[] process = new String[input.length];
for (int i = 0; i < input.length; i++)
{
try
{
Log.e("", input[i]);
process[i] = new String(input[i].getBytes("UTF-8"));
}
catch (UnsupportedEncodingException e)
{
// TODO 自動產生的 catch 區塊
e.printStackTrace();
}
}
return process;
}

沒有留言 :
張貼留言