一句话:默认解码需要改成UTF-8,用ant重新分析源代码:
public abstract class TextAnalyzer extends FileAnalyzer {
public TextAnalyzer(FileAnalyzerFactory factory) {
super(factory);
}
protected Reader getReader(InputStream stream) throws IOException {
InputStream in = stream.markSupported() ?
stream : new BufferedInputStream(stream);
String charset = null;
in.mark(3);
byte[] head = new byte[3];
int br = in.read(head, 0, 3);
if (br >= 2
&& (head[0] == (byte) 0xFE && head[1] == (byte) 0xFF)
|| (head[0] == (byte) 0xFF && head[1] == (byte) 0xFE)) {
charset = "UTF-16";
in.reset();
} else if (br >= 3 && head[0] == (byte) 0xEF && head[1] == (byte) 0xBB
&