Last post Jul 25, 2013 02:29 AM by yunus1298
Jul 24, 2013 11:01 AM|yunus1298|LINK
i want to take Russian or Arabic querystring from my url, but although the link is normal on the characters, getting inside with garbled characters.
i need to use Russian or Arabic urls and take them from querystring.
Jul 24, 2013 11:07 AM|matifnadeem|LINK
Your answer is present here
Hope it helps you out. Let me know if any query remains.
Jul 24, 2013 11:08 AM|akfkmupiwu|LINK
you can declare Request and Response encoding in web.config as below:
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
You can Google "unicode characters + querystring + asp.net" for further investigation...
Jul 24, 2013 11:09 AM|Rion Williams|LINK
You mention that the characters are appearing garbled within the QueryString, which is likely normal as ASP.NET will encode specific sets of characters (such as Arabic or Cyrillic) for security purposes in the application.
Although the values may appear to be garbled, this is simply HTML encoding and the values should still be accessible through the QueryString object as they would normally.
If you are still encountering issues, you may want to consider changing the globalization settings within your application as mentioned in
this MSDN article by making the following change within your web.config file :
<!-- This sets the encoding to "utf-8" to handle unicode characters -->
<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" />
Jul 25, 2013 01:51 AM|yunus1298|LINK
Thanks Rion,but i tried and not solved my problem.
Jul 25, 2013 02:29 AM|yunus1298|LINK
Hi matifnadeem ,
i tried your solution but didnt solved my problem.
my original url is : /news/مبني-الإدارة-الجاهز-الحديث-لبلدية-آفشا-بتركيا.html
and request.querystring result is : Ù…Ø¨Ù†ÙŠ-Ø§Ù„Ø¥Ø¯Ø§Ø±Ø©-Ø§Ù„Ø¬Ø§Ù‡Ø²-Ø§Ù„ØØ¯ÙŠØ«-Ù„Ø¨Ù„Ø¯ÙŠØ©-Ø¢ÙØ´Ø§-Ø¨ØªØ±ÙƒÙŠØ§
note : my requests encoding utf-8