How to change – in url.
I have got the same problem with space so i changed it with %20 and it worked:
name = name.replaceAll(" ","%20");
What is the equivalent of “-” in an url?
I tried %2C and it doesn’t word: %2C -> “,”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I know the dash char is considered a safe char in the URL. If you have problems, then the problems might have nothing to do with the dash. Try, though, to replace it with %2D.