Url encode can be confusing

URL encoding converts characters into a format that avoid getting in trouble if a parameter has for example & ampersant. This can happen with many other characters. 

BUT !  When you get a url parameter and you assume that it is url encoded, you take the value and do url decode. This will work. But if the url is not encoded, as long as it does not carry any special character the url decode works. If url has a special character and you do url decode, strange things come out of the special characters.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s