从java中获取一个字符串并将其放入一个文本文件中。当字符串被写入时,它不包含 Â,但是当字符串在 word pad 中打开时,字符就会出现。
没有的字符串:
Notice of Appeal:
Hamilton City Board of Education
字符串:
Notice of Appeal:
Â
Â
Hamilton City Board of Education
下面是写字符串
out = new BufferedWriter (new FileWriter(filePrefix + "-body" + ".txt"));
out.write("From: " + em.from);
out.newLine();
out.write("Sent Date: " + em.sentDate);
out.newLine();
out.write("Subject: " + em.subject);
out.newLine();
out.newLine();
out.newLine();
String temp = new String(emi.stringContent.getBytes("UTF-8"), "UTF-8");
out.write(temp);
我应该怎么做才能不让它们出现在 word pad 中?