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
Alexey Smirnov - 26 Sep 2007 10:12 GMT
On Sep 26, 10:52 am, Stephan Bomholt
<StephanBomh...@discussions.microsoft.com> wrote:
> Hi,
>
[quoted text clipped - 13 lines]
>
> 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
Michael Nemtsev, MVP - 26 Sep 2007 12:20 GMT
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>