package com.common;
import java.io.*;
public class CharactorEncoding {
public String toString(String str)
{
String text = "";
if(str != null && !"".equals(str))
{
try {
text = new String(str.getBytes("ISO-8859-1"),"UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
return text;
}
}java 解决中文乱码
最新推荐文章于 2024-03-23 21:38:40 发布
738

被折叠的 条评论
为什么被折叠?



