package com.util;
import java.io.UnsupportedEncodingException;
/**
* 工具类
* @author Administrator
*
*/
public class CommonUtils {
/**
* 转换编码 iso8859-1 为 utf-8
* @param str
* @return
*/
public static String changeUTF(String str) {
String newStr = null;
try {
newStr = new String(str.getBytes("iso8859-1"),"utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return newStr;
}
}