【发布时间】:2019-10-12 18:20:05
【问题描述】:
我有一个程序,其中一个表格显示在屏幕上。只要没有重音,内容就会正确显示。
这是我的代码
StringBuffer sBuff = new StringBuffer();
if(!("CSV".equalsIgnoreCase(exportFormat) || "HTML".equalsIgnoreCase(exportFormat))){
sBuff.append("<p title=\""+displayparseado+"\">");
sBuff.append(displayparseado);
sBuff.append("</p>");
}
else{
sBuff.append(display);
}
我也试过解析字符串。
byte arr[] = display.getBytes("UTF-8");
String displayparseado = new String(arr);
预期输出:Descripción de prueba。
实际输出:
一个注释;我不能使用外部库。
【问题讨论】:
-
你在前端使用百里香吗?
-
看起来你逃离了你的
sBuff。不要这样做,