Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

issue on output Chinese characters in razor page

$
0
0

Hi~

In razor page:

var t1 = "@("测试")";
var t2 = "@(Html.Raw("测试"))";

In the above ,why the Chinese characters will auto convert to Unicode  characters  when render ?

Here's the result

var t1 = "测试";
var t2 = "测试";

In asp.net (not core) , the razor page will render "测试" ,i don't want to always use Html.Raw , that's not security for user's input.

Plz help me to resolve this issue.

Thanks


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>