Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery Html.Raw(字符串unicode)_Jquery_Asp.net Mvc - Fatal编程技术网

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在引号中。