Can any one explain me difference between `&#32; and &nbsp;` ?

I have html data stored in database in binary form and space in that can be either of `&nbsp;` or `&#32;` or sometimes `&#160;`. 

Also issue is when I convert this HTML to plain text using **`JSoup lib`** it is converting it properly but if I use String.contains(my string) method of java. It looks like the HTML data which is having `&nbsp;` is different from which is having `&#32;`. String is not found in either vice versa. 

Example: 

HTML1 : `This&#32;is&#32;my&#32;test&#32;string`

HTML2 : `This&nbsp;is&nbsp;my&nbsp;test&nbsp;string`

If I convert it to plain text using JSoup. It returns

HTML 1 : This is my test string

HTML 2 : This is my test string

But still both string are not same. Why is it so?