WebForm routing and cyrillic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bary40
    New Member
    • Jun 2010
    • 1

    #1

    WebForm routing and cyrillic

    Hello

    I'm using .net 4 webform routing

    i have a rout like this

    routes.MapPageR oute("JobPrevie w", "jobs/{jobId}/{pg}/{Position}", "~/default.aspx")

    When the position is in Latin letters there is no problem, the resulted Url is like this

    "http://mydomain.com/jobs/1/1/programer"

    But when the position is in Cyrillic letters, it's not displayed correctly, it's displayed like this

    "http://mydomain.com/jobs/1/1/%D0%A1%D0%B5%D1 %80"

    I tried server.urlencod e but no success.

    how to get the Cyrillic letters displayed correctly?

    I've see other websites displaying it correctly, so there is a way, but how?

    Any help will be appreciated

    Thanks in advance
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Maybe Cyrillic letters cannot be rendered using ASCII. You probably have to use Unicode instead. I don't know how to do this but I think it is your problem.

    Here is a MSDN article on Using Unicode Encoding that might get you pointed in the right direction. If not, keep researching this topic because I believe it's the root of your problem.

    -Frinny

    Comment

    • aliyalcin
      New Member
      • Sep 2012
      • 2

      #3
      Hi bary40,
      your url is encoded.
      If you show correct url, you must use this code:
      Code:
      Server.UrlDecode("your encoded url");
      Good Luck :)

      Comment

      Working...