Re: Cookie Encoding/sharing ASP.Net and ASP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hallo Alex,

now i have the name url-encoded in the cookie, but without success... The ASP-Developer says, ASP will do decoding automaticly. Is this right?

I have attached a hardcopy...

Thanks

Stephan




Alexey Smirnov schrieb:
On Sep 26, 10:52 am, Stephan Bomholt
<StephanBomh...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,

i have a little problem with cookie encoding. Our ASP.Net web-app uses
UTF-8/Unicode Encoding as default. Now we write an cookie with for example
the username in it. In Germany names can contain umlauts like äöüß...

Another web-app, written in ASP from another developer, read out the cookie
and have a problem with umlauts. They uses the ISO-8859-1 encoding, so there
are cryptic signs instead of the umlauts.

How can i save the username in the cookie with another encoding? I have
tried things like Encoding.Convert(unicode,iso, encodedBytes) but it doesn´t
work.

Thanks for any hint....

Stephan

Hallo Stephan

according to this KB article http://support.microsoft.com/kb/313282
ASP cookies are encoded in UrlEncode format, so maybe the problem is
that you would need to decode the data using UrlDecode in ASP.NET? Try
this


JPEG image



Relevant Pages