How to force ASP.NET MVC to read .cshtml files as UTF-8?

前端 未结 2 1689
栀梦
栀梦 2020-12-31 16:06

When rendering a view, I encounter a problem with encoding, i.e. unicode characters are displayed incorrectly.

According to an answer to an unrelated question:

2条回答
  •  灰色年华
    2020-12-31 16:32

    I believe encoding is not the responsibility of MVC, rather IIS. Do you have this line in your web.config?

    
    

提交回复
热议问题