0
从MS字粘贴过来的HTML中的所有标点符号,显示为小方块而不是“或”字符显示为“FS”,并且“GS”在 纯HTML记事本+ and
。我试图用“幻觉记忆三世”字体,但它并没有帮助的。 有何建议?使用kendo.drawing.exportPDF时,从Word粘贴的文字显示错误
从MS字粘贴过来的HTML中的所有标点符号,显示为小方块而不是“或”字符显示为“FS”,并且“GS”在 纯HTML记事本+ and
。我试图用“幻觉记忆三世”字体,但它并没有帮助的。 有何建议?使用kendo.drawing.exportPDF时,从Word粘贴的文字显示错误
截至更换所有问题的字符。
String.prototype.replaceAll = function(str1, str2, ignore)
{
return this.replace(new RegExp(str1.replace(/([\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g, function(c){return "\\" + c;}), "g"+(ignore?"i":"")), str2);
};
然后对于每个文本单元格:
function cleanHTML(input) {
var output = input.replaceAll('“','"');
output = output.replaceAll('”', '"');
output = output.replaceAll("’", "'");
output = output.replaceAll("‘", "'");
output = output.replaceAll("", "'");
output = output.replaceAll("", "-");
output = output.replaceAll("", "'");
return output;
}
无论其他章程将在稍后显示,我将为其添加一个替换。 希望有人会从中受益。