In my ASP.NET MVC application i am using Chinese Category Name, it was displayed as %E8%82%B2%E5%84%BF in IE’s URL address, but the actual value is ‘育儿’.
I want to know how can I convert ‘育儿’ into %E8%82%B2%E5%84%BF in C# and how can I convert it back, too. Is it possible display ‘育儿’ in the URL link directly? Will it be good for SEO?
The text displayed in IE’s address bar is the URL encoded form of the hex version of those characters. The hex version of ‘育儿’ encoded in UTF-8 is E882B2E584BF:
s is equal to ‘育儿’.
You shouldn’t transmit the straight chinese characters in the URL, it should be URL encoded using HttpServerUtility.UrlEncode and UrlDecode.