iis 5.0上的cookie代码页问题 [英] cookie codepage problem on iis 5.0
问题描述
我设置一个cookie来保存utf-8字符串。由服务器或
客户端。没关系。
当我尝试使用Request.Cookies(my_utf8_cookie)来读取这个cookie时
iis 5.0上的
我得到垃圾。
这个垃圾似乎是将utf-8数据视为一些
单字节编码的结果。
i有<%@ codepage =" ; 65001"%设置在页面顶部。
此问题不会出现在iis 5.1上。
i已经搜索了很长时间并且难以在新闻中修复此问题 - 团体和
网络但无济于事。
很多人提到这个问题,但没有人给出适当的解决方案。
i hope来自MS的某人看到这篇文章并将结束这个
问题。
提前多多谢谢,
Eyal Herlin
i set a cookie to hold a utf-8 string. either by the server or by the
client. it doesn''t matter.
when i try to read this cookie using Request.Cookies("my_utf8_cookie")
on iis 5.0 i get garbage.
this garbage seems to be the result of treating the utf-8 data as some
single-byte encoding.
i have <%@ codepage="65001"%set on the top of the page.
this problem does not appear on iis 5.1.
i have searched long and hard for a fix for this on news-groups and the
web but to no avail.
many people mention the problem but noone gives a proper fix.
i hope someone from MS sees this post and will put an end to this
issue.
thanks alot in advance,
Eyal Herlin
推荐答案
< ey ********* @ gmail.comwrote in消息
news:11 ********************** @ i12g2000cwa.googlegr oups.com ...
<ey*********@gmail.comwrote in message
news:11**********************@i12g2000cwa.googlegr oups.com...
我设置一个cookie来保存utf-8字符串。由服务器或
客户端。没关系。
当我尝试使用Request.Cookies(my_utf8_cookie)来读取这个cookie时
iis 5.0上的
我得到垃圾。
这个垃圾似乎是将utf-8数据视为一些
单字节编码的结果。
i有<%@ codepage =" ; 65001"%设置在页面顶部。
此问题不会出现在iis 5.1上。
i已经搜索了很长时间并且难以在新闻中修复此问题 - 团体和
网络但无济于事。
很多人提到这个问题,但没有人给出适当的解决方案。
i hope来自MS的某人看到这篇文章并将结束这个问题。
问题。
i set a cookie to hold a utf-8 string. either by the server or by the
client. it doesn''t matter.
when i try to read this cookie using Request.Cookies("my_utf8_cookie")
on iis 5.0 i get garbage.
this garbage seems to be the result of treating the utf-8 data as some
single-byte encoding.
i have <%@ codepage="65001"%set on the top of the page.
this problem does not appear on iis 5.1.
i have searched long and hard for a fix for this on news-groups and the
web but to no avail.
many people mention the problem but noone gives a proper fix.
i hope someone from MS sees this post and will put an end to this
issue.
您能否将管理编码cookie的代码发布为UTF-8?
Can you post the code that is managing to encode a cookie as UTF-8?
> ;
提前多谢,
Eyal Herlin
>
thanks alot in advance,
Eyal Herlin
你在说什么浏览器也使用utf-8(在HTML中):
< META HTTP-EQUIV =" Content-Type" CONTENT =" text / html的; charset = utf-8">
(我想你也可以用response.charset做到这一点)
-
- Mark Schupp
" Anthony Jones" < An*@yadayadayada.com写信息
新闻:O2 ************* @ TK2MSFTNGP04.phx.gbl ...
Are you telling the browser to use utf-8 also (in the HTML):
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
(I think you can do this with response.charset also)
--
--Mark Schupp
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:O2*************@TK2MSFTNGP04.phx.gbl...
>
< ey ********* @ gmail.comwrote in message
news:11 ** ********************@i12g2000cwa.googlegr oups.com ...
>
<ey*********@gmail.comwrote in message
news:11**********************@i12g2000cwa.googlegr oups.com...
> hi,
我设置一个cookie来保存utf-8字符串。由服务器或
客户端。没关系。
当我尝试在iis 5.0上使用Request.Cookies(my_utf8_cookie)
读取这个cookie时,我得到了垃圾。
这个垃圾似乎是结果将utf-8数据视为一些单字节编码。
我在页面顶部设置了<%@ codepage =" 65001"%
此问题确实存在没有出现在iis 5.1上。
我已经在新闻组和网页上搜索了很长时间并且很难解决这个问题,但无济于事。
很多人都提到了这个问题,但没有人给出正确的修复。
我希望MS的某个人看到这篇文章,并将结束这个问题。
>
i set a cookie to hold a utf-8 string. either by the server or by the
client. it doesn''t matter.
when i try to read this cookie using Request.Cookies("my_utf8_cookie")
on iis 5.0 i get garbage.
this garbage seems to be the result of treating the utf-8 data as some
single-byte encoding.
i have <%@ codepage="65001"%set on the top of the page.
this problem does not appear on iis 5.1.
i have searched long and hard for a fix for this on news-groups and the
web but to no avail.
many people mention the problem but noone gives a proper fix.
i hope someone from MS sees this post and will put an end to this
issue.
您能否将管理编码cookie的代码发布为UTF-8?
Can you post the code that is managing to encode a cookie as UTF-8?
> ;>
非常感谢,Eyal Herlin
>>
thanks alot in advance,
Eyal Herlin
" Mark Schupp" < no ****** @ email.netwrote in message
news:eL ************** @ TK2MSFTNGP03.phx.gbl ...
"Mark Schupp" <no******@email.netwrote in message
news:eL**************@TK2MSFTNGP03.phx.gbl...
您是否告诉浏览器也使用utf-8(在HTML中):
< META HTTP-EQUIV = QUOT;内容类型" CONTENT =" text / html的; charset = utf-8">
(我想你也可以用response.charset做到这一点)
Are you telling the browser to use utf-8 also (in the HTML):
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
(I think you can do this with response.charset also)
那个''会影响内容,但Cookie标题不在内容中。
我甚至不确定如何创建一个UTF-8编码的Cookie? >
首先。
That''ll impact the content but the cookie headers are outside the content.
I''m not even sure how one would go about creating a UTF-8 encoded Cookie in
the first place.
这篇关于iis 5.0上的cookie代码页问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!