Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Cookie Encoding/sharing ASP.Net and ASP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephan Bomholt - 26 Sep 2007 09:52 GMT
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>

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.