473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

Jan 2 '07 #1
10 2214

<ey*********@gmail.comwrote in message
news:11**********************@i12g2000cwa.googlegr oups.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

Jan 3 '07 #2
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...
>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


Jan 5 '07 #3

"Mark Schupp" <no******@email.netwrote in message
news:eL**************@TK2MSFTNGP03.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)
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.

Jan 5 '07 #4
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:
<eyal.her...@gmail.comwrote in messagenews:11**********************@i12g2000cwa.g ooglegroups.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 -
Jan 30 '07 #5
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:
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:O2*************@TK2MSFTNGP04.phx.gbl.. .


<eyal.her...@gmail.comwrote in message
news:11**********************@i12g2000cwa.googlegr oups.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 -
Jan 30 '07 #6

<ey*********@gmail.comwrote in message
news:11**********************@h3g2000cwc.googlegro ups.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?


Jan 30 '07 #7
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:
<eyal.her...@gmail.comwrote in message

news:11**********************@h3g2000cwc.googlegro ups.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?

Jan 30 '07 #8

<ey*********@gmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.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" <A...@yadayadayada.comwrote:
<eyal.her...@gmail.comwrote in message

news:11**********************@h3g2000cwc.googlegro ups.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?


Jan 30 '07 #9

"Anthony Jones" <An*@yadayadayada.comwrote in message
news:um**************@TK2MSFTNGP05.phx.gbl...
>
<ey*********@gmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.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.
Jan 31 '07 #10

On Jan 31, 2:41 pm, "Anthony Jones" <A...@yadayadayada.comwrote:
"Anthony Jones" <A...@yadayadayada.comwrote in message

news:um**************@TK2MSFTNGP05.phx.gbl...


<eyal.her...@gmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.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 -

Jan 31 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alex | last post by:
Dear all, I am now creating an CMS which support 3 languages (English, Traditional Chinese and Simplified Chinese). The user can change their languages dynamically; however, I would like to...
10
by: Christopher H. Laco | last post by:
Long story longer. I need to get web user input into a backend system that a) only grocks single byte encoding, b) expectes the data transer to be 1 bytes = 1 character, and c) uses the HP Roman-6...
1
by: brad | last post by:
Hi, Im using classic ASP (3.0) and I have a web farm with 2 webservers (webserver A and webserver B, both windows server 2003). I do not want to store any client specific information on the...
3
by: Scott | last post by:
Here is the scenario. I need to launch a popup using window.open, but can't pass everything i need to pass on the querystring. So I thought I would set a cookie. Basically I do: ...
8
by: Kim Bundgaard | last post by:
Hi Anyone know where I can look for problem with codepage conversion between DB2 UDB Connect EE V8.2 (fixpak 3) and DB2 UDB z/OS V7. With DB2 UDB Connect EE V7.2 (fixpak 7) i get Ebcdic X'5A'...
4
by: Ram | last post by:
Dear All, Good Day I am trying to convert a file which is generated on AS400 with codepage 00420 (arabic & English data combination) with no success. But using the same code( and changing 20420...
0
by: Namespace | last post by:
Hi I have a search page (aspx) where users have the option to "remember" their search criterias. I use a a cookie to store these criterias. No problem in storing and retreiving these values from...
0
by: asklucas | last post by:
Hi there, I got an MS Access DB, which is causing problems when the client PC is running using a Traditional Chinese codepage. The DB was probably created with Access 97, Western European...
0
by: SiliconJaltz | last post by:
Hi, I'm trying to convert some RTF text to Unicode UTF-16. The characters I'm converting are double byte Japanese. The character set is fcharset128 which should be codepage 932. I am looking...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.