Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 2nd, 2007, 04:35 PM
eyal.herlin@gmail.com
Guest
 
Posts: n/a
Default cookie codepage problem on iis 5.0

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

  #2  
Old January 3rd, 2007, 10:45 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0


<eyal.herlin@gmail.comwrote in message
news:1167755357.856055.302550@i12g2000cwa.googlegr oups.com...
Quote:
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?
Quote:
>
thanks alot in advance,
Eyal Herlin
>

  #3  
Old January 5th, 2007, 07:55 PM
Mark Schupp
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0

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" <Ant@yadayadayada.comwrote in message
news:O2x3je4LHHA.140@TK2MSFTNGP04.phx.gbl...
Quote:
>
<eyal.herlin@gmail.comwrote in message
news:1167755357.856055.302550@i12g2000cwa.googlegr oups.com...
Quote:
>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?
>
Quote:
>>
>thanks alot in advance,
>Eyal Herlin
>>
>
>

  #4  
Old January 5th, 2007, 09:35 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0


"Mark Schupp" <notvalid@email.netwrote in message
news:eLRolIQMHHA.4384@TK2MSFTNGP03.phx.gbl...
Quote:
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)
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.



  #5  
Old January 30th, 2007, 02:25 PM
eyal.herlin@gmail.com
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0

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" <A...@yadayadayada.comwrote:
Quote:
<eyal.her...@gmail.comwrote in messagenews:1167755357.856055.302550@i12g2000cwa.g ooglegroups.com...
>
>
>
>
>
Quote:
hi,
>
Quote:
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.
>
Quote:
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?
>
>
>
>
>
Quote:
thanks alot in advance,
Eyal Herlin- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -
  #6  
Old January 30th, 2007, 02:25 PM
eyal.herlin@gmail.com
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0

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" <notva...@email.netwrote:
Quote:
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" <A...@yadayadayada.comwrote in messagenews:O2x3je4LHHA.140@TK2MSFTNGP04.phx.gbl.. .
>
>
>
>
>
Quote:
<eyal.her...@gmail.comwrote in message
news:1167755357.856055.302550@i12g2000cwa.googlegr oups.com...
Quote:
hi,
>
Quote:
Quote:
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.
>
Quote:
Quote:
i hope someone from MS sees this post and will put an end to this
issue.
>
Quote:
Can you post the code that is managing to encode a cookie as UTF-8?
>
Quote:
Quote:
thanks alot in advance,
Eyal Herlin- Hide quoted text -- Show quoted text -
  #7  
Old January 30th, 2007, 03:35 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0


<eyal.herlin@gmail.comwrote in message
news:1170166576.102914.302180@h3g2000cwc.googlegro ups.com...
Quote:
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?








  #8  
Old January 30th, 2007, 08:45 PM
eyal.herlin@gmail.com
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0

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" <A...@yadayadayada.comwrote:
Quote:
<eyal.her...@gmail.comwrote in message
>
news:1170166576.102914.302180@h3g2000cwc.googlegro ups.com...
>
Quote:
hi anthony,
>
Quote:
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?

  #9  
Old January 30th, 2007, 11:15 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0


<eyal.herlin@gmail.comwrote in message
news:1170189419.987023.230130@l53g2000cwa.googlegr oups.com...
Quote:
the problem i am having is on iis 5.0 on win2k.
That's the platform I'm testing on also.
Quote:
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.
Quote:
>
On Jan 30, 5:20 pm, "Anthony Jones" <A...@yadayadayada.comwrote:
Quote:
<eyal.her...@gmail.comwrote in message

news:1170166576.102914.302180@h3g2000cwc.googlegro ups.com...
Quote:
hi anthony,
Quote:
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
Quote:
Quote:
UTF-8.

What server are you using?
>
>

  #10  
Old January 31st, 2007, 12:55 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0


"Anthony Jones" <Ant@yadayadayada.comwrote in message
news:umL0fJMRHHA.4252@TK2MSFTNGP05.phx.gbl...
Quote:
>
<eyal.herlin@gmail.comwrote in message
news:1170189419.987023.230130@l53g2000cwa.googlegr oups.com...
Quote:
the problem i am having is on iis 5.0 on win2k.
>
That's the platform I'm testing on also.
>
Quote:
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.


  #11  
Old January 31st, 2007, 12:55 PM
eyal.herlin@gmail.com
Guest
 
Posts: n/a
Default Re: cookie codepage problem on iis 5.0


On Jan 31, 2:41 pm, "Anthony Jones" <A...@yadayadayada.comwrote:
Quote:
"Anthony Jones" <A...@yadayadayada.comwrote in message
>
news:umL0fJMRHHA.4252@TK2MSFTNGP05.phx.gbl...
>
>
>
>
>
>
>
Quote:
<eyal.her...@gmail.comwrote in message
news:1170189419.987023.230130@l53g2000cwa.googlegr oups.com...
Quote:
the problem i am having is on iis 5.0 on win2k.
>
Quote:
That's the platform I'm testing on also.
>
Quote:
Quote:
it is my experience that Response.Cookies("test") =
strContainsOutOfBandChars
works fine. i assumed that by strContainsOutOfBandChars u mean a utf-8
string.
>
Quote:
Yes my mistake I had forgotten to actually save my test file as UTF-8
>
Quote:
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
Quote:
>
- Show quoted text -

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles