Jquery Html.Raw(字符串unicode)
我在Jquery Html.Raw(字符串unicode),jquery,asp.net-mvc,Jquery,Asp.net Mvc,我在javascript中创建了一个带有unicode字符的变量,如“tümü”,但它如下所示: var tümü = "tümü"; //true form : var tümü = "tümü" if ("@Culture" == "tr-TR") { @Html.Raw("$('#citySelect [value=-1]').text('Tümü')"); //string seem on page:tümü how can I fix this
javascript
中创建了一个带有unicode字符的变量,如“tümü”,但它如下所示:
var tümü = "tümü"; //true form : var tümü = "tümü"
if ("@Culture" == "tr-TR") {
@Html.Raw("$('#citySelect [value=-1]').text('Tümü')"); //string seem on page:tümü how can I fix this ??
}
else {
$("#citySelect [value='-1']").text("All");
}
这可能与页面上的字符编码有关。将以下内容添加到
标记中,然后再添加其他内容
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
当我这样做时:@Html.Raw(“Tümü”)会正确地输出Tümü。这对你有用吗?你的角色集是utf-8吗?第二行真的有效吗:如果(“@Culture”==“tr tr”),我看到@Culture在引号中。