When creating dnn skins and development modules, you may encounter Chinese garbled characters. The following is a solution.
Garbled skin
When creating a dotnetnuke skin,The text on the skin is garbled.
Solution:
- In Dreamweaver, click "Modify-> page properties-> title/encoding" and change "encoding" to "UTF-8"
- Modify the globalization section in Web. config as follows:
< Globalization Culture = "ZH-CN" Uiculture = "ZH-CN" Requestencoding = "UTF-8"
Responseencoding = "UTF-8" Fileencoding = "UTF-8" /> (Remove the carriage return when copying data directly)
Chinese garbled characters in the module
After the modules developed in VS 2005 are installed, the Chinese characters on the Interface become garbled characters.
Solution:
- In VS 2005, click "file-> advanced save option", encoding select "Unicode (UTF-8 with signature)-codePage 65001 )"
- The steps are the same as those in the skin Garbled text. Modify the Web. config file.
Causes of the above two problems
The cause of the problem is the encoding andProgramThe Set decoding method is inconsistent. The general dnn help document requires that the encoding method in the globalization Section be modified to gb2312. However, this method causes the dnn to incorrectly decode some Chinese characters.
Garbled SQL script files
The SQL script file of the module (for example, 01.00.00.sqldataprovider) contains Chinese characters (we usually fill in some sample data). After uploading and installing the module, the Chinese fields written to the Database become garbled characters. For more information, see SQL Server 2005 express and Asp.net. It is probably not a common UTF-8 encoding problem.
This is a bug in dnn. When the dnn execution module is installed, all SQL scripts will be converted into ASCII, so the dual-byte text will become garbled. For detailed analysis, see how the open-source ASP. Net program processes file encoding-from dotnetnuke
Solution:
Move this part to page_load () to avoid the dnn bug.