How to retrieve quertring parameter value containing unicode characters which are entered manually

Last post 06-15-2009 5:44 AM by Asm_New. 2 replies.

Sort Posts:

  • How to retrieve quertring parameter value containing unicode characters which are entered manually

    06-15-2009, 5:27 AM
    • Member
      point Member
    • Asm_New
    • Member since 06-15-2009, 4:46 AM
    • Posts 2

     Hi,

    In my application, user can edit and change the values of querystring parameters. As the application supports Spanish and French languages, user can enter the unicode characters in querystring. The values edited by user are retrieved using Request.Querystring method. But when unicode characters like á,é,í,ó,ú,ý,etc.are entered in the querystring, these characters are not retrieved properly on server side. E.g. If value like "Googleèsn" is entered in the querystring then actual value retrieved on the server side is "Google�sn". This is observed only in case of unicode characters.

    Also, I can not encode the querystring parameters values as those are entered manually by the user.

    I am using visual studio 2005 and .net framework 2.0. The server side code is written in VB.NET.

     Can anyone please tell me how to retrieve unicode characters entered manually in the querystring?

     

    Thanks

  • Re: How to retrieve quertring parameter value containing unicode characters which are entered manually

    06-15-2009, 5:38 AM
    Answer
    • All-Star
      25,845 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Mumbai
    • Posts 4,391

     Hi,

    Hav U tried..

    Server.UrlDecode

    Or

     HttpUtility.UrlEncode(Request.QueryString("value"))
     and HttpUtility.UrlEncodeUnicode(Request.QueryString("value"))

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
  • Re: How to retrieve quertring parameter value containing unicode characters which are entered manually

    06-15-2009, 5:44 AM
    • Member
      point Member
    • Asm_New
    • Member since 06-15-2009, 4:46 AM
    • Posts 2
    yes, i tried Server.UrlDecode. I thing i need to decode the querystring value so did not tried HttpUtility.UrlEncode.
Page 1 of 1 (3 items)