我有以下Smartclient JS代码,它不能在UI中正确呈现UTF-8字符
function getGridLoadedWithDatasource(DS, DSfields) {
var statGrid = isc.ListGrid.create({
ID: "statusGrid",
autoFetchData: true,
fields: DSfields,
dataSource: DS,
canEdit: false,
autoDraw: true,
showRecordComponents: true,
showRecordComponentsByCell: true,
createRecordComponent : function (record, colNum) {
var fieldName = this.getFieldName(colNum);
if (fieldName == "btnClaim" && record["PTicketname"]=='Reklamacija') {
var button = isc.IButton.create({
height: 18,
width: 65,
//icon: "flags/16/" + record["countryCode"] + ".png",
title: "Žalba",
click : function () {
//alert("Hello man!");
isc.say("Need to draw a form here");
//getInvoiceDetailWindow(record["rednibr"],tech, ba_id);
}
});
return button;
}
}
});
return statGrid;
}我用来表示标题的单词在UI上被破坏了。如何以及在何处为smartclient小部件启用/配置UTF-8?
诚挚的问候!
发布于 2012-12-06 17:01:04
如果在Javascript代码中使用特殊字符作为文字,则必须确保Javascript源代码具有与主页相同的字符编码。例如,在Notepad++中,您应该使用菜单"Encoding / UTF-8 without BOM“或类似菜单将其设置为UTF-8。
https://stackoverflow.com/questions/13739523
复制相似问题