Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between %20 and %2 in url

Tags:

java

url

web

The java application that I am developing right now is posting an url and some part of the url is like this:

asset=travel%2Ccar%2Chouse%2Cbusiness

is there any difference with %20 and %2 in the urls? I know that %20 means spaces but i am a little bit confused when I saw the %2.

like image 444
anathema Avatar asked Feb 27 '14 01:02

anathema


2 Answers

%2C is a comma and %20 is a space.

like image 178
Isaiah Turner Avatar answered Oct 03 '22 09:10

Isaiah Turner


The % indicates an escaped character. It's a hexadecimal number that follows in the next two characters. In your example that is %2C, which is the hexadecimal number for the comma. Unescaped that becomes asset=travel,car,house,business

like image 33
Ghostkeeper Avatar answered Oct 03 '22 09:10

Ghostkeeper