Cookie Encoding/sharing ASP.Net and ASP

G

Guest

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
 
G

Guest

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
 
M

Michael Nemtsev, MVP

Hello Stephan,

Mads Kristensen wrote about this recently. see there http://feeds.feedburner.com/~r/netSlave/~3/154202987/post.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


SB> Hi,
SB>
SB> i have a little problem with cookie encoding. Our ASP.Net web-app
SB> uses UTF-8/Unicode Encoding as default. Now we write an cookie with
SB> for example the username in it. In Germany names can contain umlauts
SB> like äöüß...
SB>
SB> Another web-app, written in ASP from another developer, read out the
SB> cookie and have a problem with umlauts. They uses the ISO-8859-1
SB> encoding, so there are cryptic signs instead of the umlauts.
SB>
SB> How can i save the username in the cookie with another encoding? I
SB> have tried things like Encoding.Convert(unicode,iso, encodedBytes)
SB> but it doesn´t work.
SB>
SB> Thanks for any hint....
SB>
SB> Stephan
SB>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top