How to solve Chinese can't display problems normally in ASP.NET?

xiaoxiao2021-03-06  93

Many times ASP.NET will not display Chinese, how to solve this depressed small problem? You can try the following solutions:

First approach:

Add the <% @ codepage = "936"%> "statement to each page. E.g:

<% @ Codepage = "936"%>

<% @ Import namespace = "system.data"%>

<% @ Import namespace = "system.data.ado"%>

<% @ Import namespace = "system.globalization"%>

Second approach:

Add a config.Web file to the web directory.

First create a file config.web, the content is as follows:

<

Globalization

RequestentEncoding = "UTF-8"

ResponseEncoding = "UTF-8"

/>

Then put it in the web directory.

Third approach:

Find this file in Winnt / Complus / [Version] /config.web, Note [Version] refers to the version number of NGWS, such as: WinNT / Complus / 1812.9 / config.web, then we open this file with Notepad, find As follows:

RequestentEncoding = "US-ASCII"

ResponseEncoding = "ISO-8859-1"

/> See if you can help you solve these small problems.

转载请注明原文地址:https://www.9cbs.com/read-96697.html

New Post(0)