don't have a Chinese system, so I cannot test for you, but modify your web.config:<configuration>
<system.web>
      <globalization requestEncoding="GB2312" responseEncoding="GB2312" uiCulture="zh-CN"  culture="zh-CN" fileEncoding="GB2312" /> 
   </system.web>
</configuration>

解决方案 »

  1.   

    Assume you are using a Chinese system, I think ASP uses gb2312 as the default encoding and ASP.NET uses UTF8 as the default encoding, that is why i suggest you change the default encoding in web.configI am not sure if it work, but try (didn't test, so it may not work):>>>我在普通asp中写入中文COOKIES值,在ASP.NET中读取出的是乱码
    s = System.Text.Encoding.UTF8.GetString(System.Text.Encoding.GetEncoding("GB2312").GetBytes(Request.Cookies["SomeCookie"].Value))>>>我在ASP.NET中写入中文COOKIES值,在普通asp中读取出的是乱码
    Request.Cookies["SomeCookie"].Value = System.Text.Encoding.GetEncoding("GB2312").GetString(System.Text.Encoding.UTF8.GetBytes("中文")));
      

  2.   

    思归 大哥你好!非常感谢你能回答我的问题(就是哪个ASP和asp.net间COOKIES的问题)。但是好象还是不行。我仔细看了一下本地保存的COOKIES文件如果使用asp保存COOKIES则中文将保存成某种格式的代码比如,“中国”保存成了:“%D6%D0%B9%FA” 。
    如果使用ASP。NET则将中文直接保存成中文也就是还是“中国”!好象ASP有自动转换功能,可以把:“%D6%D0%B9%FA”转换成“中国”(我想起了ASP中的经过Server.URLEncode()的中文,到另外一个页面中可以直接显示而无需要转换)好象问题出在ASP的自动转换上面!我也不知道我分析的是否正确。还请您在帮帮我。非常感谢。
      

  3.   

    URL服务器会帮你自动转但是Cookie不会,需要自己转你可以按照下面(asp.net中)的代码把“%D6%D0%B9%FA”转成“中国”:string str = Encoding.GetEncoding("gb2312").GetString(HttpUtility.UrlDecodeToBytes("%D6%D0%B9%FA",Encoding.GetEncoding("gb2312")));//注意引用System.Text;
      

  4.   

    如果使用asp保存COOKIES则中文将保存成某种格式的代码比如,“中国”保存成了:“%D6%D0%B9%FA” 。
    保持你的ASP的这种做法,在ASP.Net中保存Cookie时:System.Text.Encoding theEncoding = System.Text.Encoding.GetEncoding("gb2312");
    string cookieValue = HttpUtility.UrlEncode( "中国",theEncoding );Request.Cookies["SomeCookie"].Value = cookieValue;获取Cookie时:
    System.Text.Encoding theEncoding = System.Text.Encoding.GetEncoding("gb2312");
    string cookieValue = Request.Cookies["SomeCookie"].Value;string decodeValue = HttpUtility.UrlDecode( cookieValue,theEncoding );
      

  5.   

    timmy3310 太谢谢你了!问题终于解决了!这样我说什么好呢!呵呵!!