/**
* 字符集转换
*
* @param s
* ISO-8859-1字符
*
* @return GBK字符
*/
public static String toChinese(String s)
throws UnsupportedEncodingException {
if (s == null || s.trim().length() == 0) {
return null;
} else {
byte aa[] = s.getBytes("ISO-8859-1");
String ss = new String(aa, "GBK");
return ss;
}
}/**
* 字符集转换
*
* @param s
* GBK字符
*
* @return ISO-8859-1字符
*/
public static String toEnglish(String s)
throws UnsupportedEncodingException {
if (s == null || s.trim().length() == 0) {
return null;
} else {
byte aa[] = s.getBytes("GBK");
String ss = new String(aa, "ISO-8859-1");
return ss;
}
}+++++++++++++++++++++++++++++++++
楼主看看吧,希望有点用
* 字符集转换
*
* @param s
* ISO-8859-1字符
*
* @return GBK字符
*/
public static String toChinese(String s)
throws UnsupportedEncodingException {
if (s == null || s.trim().length() == 0) {
return null;
} else {
byte aa[] = s.getBytes("ISO-8859-1");
String ss = new String(aa, "GBK");
return ss;
}
}/**
* 字符集转换
*
* @param s
* GBK字符
*
* @return ISO-8859-1字符
*/
public static String toEnglish(String s)
throws UnsupportedEncodingException {
if (s == null || s.trim().length() == 0) {
return null;
} else {
byte aa[] = s.getBytes("GBK");
String ss = new String(aa, "ISO-8859-1");
return ss;
}
}+++++++++++++++++++++++++++++++++
楼主看看吧,希望有点用
Windows--->>Preferences---->>Workbench--->>Fonts--->>Text Font--->>Change...