Request.Item skips non-english characters

J

Johan

Hi,
Anyone know how to tell request.item to return non-english characters. In my
example the scandiavian letters ÅÄÖåäö (AAOaao with circles and dots above)
gets skiped.
Here is the code in vb.net:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim enc As System.Text.Encoding
enc = System.Text.Encoding.GetEncoding("iso-8859-1")
Request.SaveAs("c:\htmlrequest.txt", True)
Label2.Text =
HttpUtility.UrlDecode("%2F1.+PAFs+Spelregler%2F2.+Huvudprocess%2FSpelunderh%E5llning%2FDigitala+spel",
enc)
Label3.Text = HttpUtility.UrlDecode(Request.Item("path"), enc)
End Sub

The problem is the sequence %E5 that should be 'a with circle' above.
Label2 gets the correct string but in Lable3 the Request.Item skips %E5 so
the 'a with circle' is removed from the text. I have tried with
Session.CodePage = 1252 with no luck.

What I'm trying to do is to pass a folder-path containing non-english
characters from an old asp-application to a new asp.net application.

c:\htmlrequest.txt=
_________
GET
/isodoc/test/uploadfile/uploadfile.aspx?work=ver&file=Internetspel.doc&path=%2F1.+PAFs+Spelregler%2F2.+Huvudprocess%2FSpelunderh%E5llning%2FDigitala+spel
HTTP/1.1
Connection: Keep-Alive
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword,
application/x-shockwave-flash, */*
Accept-Encoding: gzip, deflate
Accept-Language: sv-fi
Cookie: ASPSESSIONIDSATBQACB=JAFJAJMBFPCBCICPMAPIDEIO;
ASP.NET_SessionId=ls0tz3zttslmva45airwqonn
Host: appserver
Referer: http://appserver/isodoc/test/scriptadmin/showdoc.asp?path=/1. PAFs
Spelregler/2. Huvudprocess/Spelunderhållning/Digitala
spel&file=Internetspel.doc
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.0.3705; .NET CLR 1.1.4322)
___________

/Johan
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top