Russian and Arabic character problem RRS feed

  • Question

  • User1865475573 posted


    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.

    Wednesday, July 24, 2013 11:01 AM

All replies

  • User-782344923 posted

    Hi Yunus,

    Your answer is present here


    Hope it helps you out. Let me know if any query remains.


    Wednesday, July 24, 2013 11:07 AM
  • User1558924997 posted

    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...

    Wednesday, July 24, 2013 11:08 AM
  • User281315223 posted

    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" />
    Wednesday, July 24, 2013 11:09 AM
  • User1865475573 posted

    Thanks Rion,but i tried and not solved my problem.

    Thursday, July 25, 2013 1:51 AM
  • User1865475573 posted

    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

    Thursday, July 25, 2013 2:29 AM