cookie codepage problem on iis 5.0
cookie codepage problem on iis 5.0
am 02.01.2007 17:29:17 von eyal.herlin
hi,
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
Re: cookie codepage problem on iis 5.0
am 03.01.2007 23:36:39 von Anthony Jones
wrote in message
news:1167755357.856055.302550@i12g2000cwa.googlegroups.com.. .
> hi,
>
> 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.
Can you post the code that is managing to encode a cookie as UTF-8?
>
> thanks alot in advance,
> Eyal Herlin
>
Re: cookie codepage problem on iis 5.0
am 05.01.2007 20:45:55 von Mark Schupp
Are you telling the browser to use utf-8 also (in the HTML):
(I think you can do this with response.charset also)
--
--Mark Schupp
"Anthony Jones" wrote in message
news:O2x3je4LHHA.140@TK2MSFTNGP04.phx.gbl...
>
> wrote in message
> news:1167755357.856055.302550@i12g2000cwa.googlegroups.com.. .
>> hi,
>>
>> 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.
>
> Can you post the code that is managing to encode a cookie as UTF-8?
>
>>
>> thanks alot in advance,
>> Eyal Herlin
>>
>
>
Re: cookie codepage problem on iis 5.0
am 05.01.2007 22:29:15 von Anthony Jones
"Mark Schupp" wrote in message
news:eLRolIQMHHA.4384@TK2MSFTNGP03.phx.gbl...
> Are you telling the browser to use utf-8 also (in the HTML):
>
>
>
> (I think you can do this with response.charset also)
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.
Re: cookie codepage problem on iis 5.0
am 30.01.2007 15:16:16 von eyal.herlin
hi anthony,
to create a utf-8 cookie on the client side u should have a utf-8 html
page that sets the cookie through javascript.
to create a utf-8 cookie on the server side u need to have the <%@
codepage="65001"%> decleration on top of your asp page.
On Jan 4, 12:36 am, "Anthony Jones" wrote:
> wrote in messagenews:1167755357.856055.302550@i12g2000cwa.googlegroup s.com...
>
>
>
>
>
> > hi,
>
> > 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.Can you post the code that is managing to encode a cookie as UTF-8?
>
>
>
>
>
> > thanks alot in advance,
> > Eyal Herlin- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -
Re: cookie codepage problem on iis 5.0
am 30.01.2007 15:17:29 von eyal.herlin
hi mark,
yes i do.
my question has to do with how the server treats the cookie.
On Jan 5, 9:45 pm, "Mark Schupp" wrote:
> Are you telling the browser to use utf-8 also (in the HTML):
>
>
>
> (I think you can do this with response.charset also)
>
> --
> --Mark Schupp
>
> "Anthony Jones" wrote in messagenews:O2x3je4LHHA.140@TK2MSFTNGP04.phx.gbl...
>
>
>
>
>
> > wrote in message
> >news:1167755357.856055.302550@i12g2000cwa.googlegroups.com. ..
> >> hi,
>
> >> 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.
>
> > Can you post the code that is managing to encode a cookie as UTF-8?
>
> >> thanks alot in advance,
> >> Eyal Herlin- Hide quoted text -- Show quoted text -
Re: cookie codepage problem on iis 5.0
am 30.01.2007 16:20:23 von Anthony Jones
wrote in message
news:1170166576.102914.302180@h3g2000cwc.googlegroups.com...
> hi anthony,
>
> to create a utf-8 cookie on the client side u should have a utf-8 html
> page that sets the cookie through javascript.
> to create a utf-8 cookie on the server side u need to have the <%@
> codepage="65001"%> decleration on top of your asp page.
>
Using:-
Response.Cookies("test") = strContainsOutOfBandChars ??
In my testing characters outside of ASCII are removed when the codepage is
UTF-8.
What server are you using?
Re: cookie codepage problem on iis 5.0
am 30.01.2007 21:37:00 von eyal.herlin
the problem i am having is on iis 5.0 on win2k.
it is my experience that Response.Cookies("test") =
strContainsOutOfBandChars
works fine. i assumed that by strContainsOutOfBandChars u mean a utf-8
string.
On Jan 30, 5:20 pm, "Anthony Jones" wrote:
> wrote in message
>
> news:1170166576.102914.302180@h3g2000cwc.googlegroups.com...
>
> > hi anthony,
>
> > to create a utf-8 cookie on the client side u should have a utf-8 html
> > page that sets the cookie through javascript.
> > to create a utf-8 cookie on the server side u need to have the <%@
> > codepage="65001"%> decleration on top of your asp page.
>
> Using:-
>
> Response.Cookies("test") = strContainsOutOfBandChars ??
>
> In my testing characters outside of ASCII are removed when the codepage is
> UTF-8.
>
> What server are you using?
Re: cookie codepage problem on iis 5.0
am 31.01.2007 00:00:00 von Anthony Jones
wrote in message
news:1170189419.987023.230130@l53g2000cwa.googlegroups.com.. .
> the problem i am having is on iis 5.0 on win2k.
That's the platform I'm testing on also.
> it is my experience that Response.Cookies("test") =
> strContainsOutOfBandChars
> works fine. i assumed that by strContainsOutOfBandChars u mean a utf-8
> string.
Yes my mistake I had forgotten to actually save my test file as UTF-8
I confirm it same behaves the same for me. Looks like a tweak on IIS5.1
(which works fine for me). I'll try IIS6 tomorrow.
>
> On Jan 30, 5:20 pm, "Anthony Jones" wrote:
> > wrote in message
> >
> > news:1170166576.102914.302180@h3g2000cwc.googlegroups.com...
> >
> > > hi anthony,
> >
> > > to create a utf-8 cookie on the client side u should have a utf-8 html
> > > page that sets the cookie through javascript.
> > > to create a utf-8 cookie on the server side u need to have the <%@
> > > codepage="65001"%> decleration on top of your asp page.
> >
> > Using:-
> >
> > Response.Cookies("test") = strContainsOutOfBandChars ??
> >
> > In my testing characters outside of ASCII are removed when the codepage
is
> > UTF-8.
> >
> > What server are you using?
>
>
Re: cookie codepage problem on iis 5.0
am 31.01.2007 13:41:59 von Anthony Jones
"Anthony Jones" wrote in message
news:umL0fJMRHHA.4252@TK2MSFTNGP05.phx.gbl...
>
> wrote in message
> news:1170189419.987023.230130@l53g2000cwa.googlegroups.com.. .
> > the problem i am having is on iis 5.0 on win2k.
>
> That's the platform I'm testing on also.
>
> > it is my experience that Response.Cookies("test") =
> > strContainsOutOfBandChars
> > works fine. i assumed that by strContainsOutOfBandChars u mean a utf-8
> > string.
>
> Yes my mistake I had forgotten to actually save my test file as UTF-8
>
> I confirm it same behaves the same for me. Looks like a tweak on IIS5.1
> (which works fine for me). I'll try IIS6 tomorrow.
>
IIS 6 works fine also. Looks like an enhancement since 5.1.
Re: cookie codepage problem on iis 5.0
am 31.01.2007 13:49:40 von eyal.herlin
On Jan 31, 2:41 pm, "Anthony Jones" wrote:
> "Anthony Jones" wrote in message
>
> news:umL0fJMRHHA.4252@TK2MSFTNGP05.phx.gbl...
>
>
>
>
>
>
>
> > wrote in message
> >news:1170189419.987023.230130@l53g2000cwa.googlegroups.com. ..
> > > the problem i am having is on iis 5.0 on win2k.
>
> > That's the platform I'm testing on also.
>
> > > it is my experience that Response.Cookies("test") =
> > > strContainsOutOfBandChars
> > > works fine. i assumed that by strContainsOutOfBandChars u mean a utf-8
> > > string.
>
> > Yes my mistake I had forgotten to actually save my test file as UTF-8
>
> > I confirm it same behaves the same for me. Looks like a tweak on IIS5.1
> > (which works fine for me). I'll try IIS6 tomorrow.
>
> IIS 6 works fine also. Looks like an enhancement since 5.1.- Hide quoted text -
exactly
>
> - Show quoted text -