Home All Groups Group Topic Archive Search About

how to use System.Uri for Unicode based Url

Author
12 May 2007 2:59 AM
piyush
I have a request coming in as:
http://localhost/bhomiyo/gu.xliterate/jagjitsingh.wordpress.com/tag/%e0%a4%9c%e0%a4%97%e0%a4%9c%e0%a5%80%e0%a4%a4-%e0%a4%b8%e0%a4%bf%e0%a4%b9%e0%a4%81/%e0%a4%ac%e0%a4%bf%e0%a4%af%e0%a5%8c%e0%a4%82%e0%a5%9c-%e0%a4%9f%e0%a4%be%e0%a4%88%e0%a4%ae/

I read this request in HttpContext.Current.Request.Url.

When I log the Url it logs the actual 'unicode' string. But when I try
to log Request.Url.AbsolutePath - the value is already decoded like
%C2%A0 etc.

Also when I pass the incoming URL directly to
System.Net.WebRequest.Create(uri) - I get server error that document
not found. But if I put the same Url directly into Browser the url
works.

I don't understand what do I need to change to make everything work.

Any clues?

Thanks,
Piyush

AddThis Social Bookmark Button