|
<英文系统>英文的服务器不支持中文及中文数据库的最新解决办法 |
|
来源:发布时间:2007-11-21
|
|
方法一: 在翻阅了微软ngws文档后发现在文档的常见问题部分有提到要添加一个config.web文件到 web目录下,试了一下,中文显示果然ok了。 方法如下:
建立一个文件config.web,内容如下,放在web目录下 <configuration> <globalization requestencoding="utf-8" responseencoding="utf-8" /> </configuration>
后来在网上看到论坛中有人发帖子说将utf-8换成gb2312好像也可以,作者没有试过,大家可以一试。
方法二: 后来订阅了微软的新闻组,在微软的新闻组dotnet.framework.aspplus.general中发现有讨论这 个问题的文章,方法为添加<%@ codepage = "936" %>到每一页的开头,有点类似于jsp中的 <%@ page contenttype="text/html;charset=gb2312"%> 赶紧测试了一下,果然ok!!!
例子如下面所示: <%@ codepage = "936" %> <%@ import namespace="system.data" %> <%@ import namespace="system.data.ado" %> <%@ import namespace="system.globalization" %> <html> <head> <meta http-equiv="content-type" content="text/html; charset=gb2312"> </head>
|
| |
|
| |
|