Alex Rivera | Logout

Difference between "+" and "%A0" - urlencoding?

Asked 2011-05-31T19:53:16.903
11

I am url encoding a string of text to pass along to a function. However, it encodes the second space in a double-space as "%A0". This means that when I decode the string, the "%A0" is displayed as a question mark in a black box.

I really just need to be able to remove the extra space, but I'd like to understand what is causing this and how to handle it correctly.

For example:

Something  Something else

Encodes to:

Something+%A0Something+else
Edit
Report

1 Answer

4

A quick Googling shows that %A0 is the non-breaking space character or   in html. A + is the form-encoding for a standard space character.

Source

answered 2011-05-31T19:57:27.427

Your Answer