utf8字符编码格式转换gbk
public String utf8ToGBK(String f1, String f2) {
String line = "";
if ((null == f1) || (null == f2)) {
return "";
}
try {
BufferedReader in = new BufferedReader(new InputStreamReader(
(new FileInputStream(f1)), "utf-8"));
PrintWriter out = new PrintWriter(new OutputStreamWriter(
(new FileOutputStream(f2)), "gbk"));
while (null != (line = in.readLine())) {
out.write(new String(line.getBytes(), "gbk") + "/n");
}
in.close();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
return line;
}