Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: unescape uri

  1. #1
    New Coder
    Join Date
    Mar 2007
    Location
    italy
    Posts
    94
    Thanks
    1
    Thanked 1 Time in 1 Post

    Lightbulb unescape uri

    Hi all,

    is there a way to unescape characters so that:

    "martin%20luther" becomes "martin luther"

    ?

    Thanks
    CB

  • #2
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    Look up decodeURIComponent.
    Helping to build a bigger box. - Adam Matthews

  • #3
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    if you were actually looking for a java solution you could use the java.net.URLDecoder class

    Code:
    String decoded = URLDecoder.decode("martin%20luther");
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #4
    New Coder
    Join Date
    Mar 2007
    Location
    italy
    Posts
    94
    Thanks
    1
    Thanked 1 Time in 1 Post
    Quote Originally Posted by shyam View Post
    if you were actually looking for a java solution you could use the java.net.URLDecoder class

    Code:
    String decoded = URLDecoder.decode("martin%20luther");
    Yes, in fact I used exactly that class.

    Thanks,
    CB


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •