The difference between a "normal" space character (U + 0020) and a "non-breaking" space character (U + 00A0) is that when processing for HTML deployment, for example, or in some text editors there is a difference in the arrangement of the words when a line break can occur, for example, if you want the string
20 grados
is maintained on a single line, that is, the text arrangement does not cause it to be displayed as
20
grados
in case the text exceeds the width of the screen after the 20
and that it carries grados
to the next line.
With the use of the "non-breaking space" character (U + 00A0) to separate the words, it will be achieved that when the screen width is exceeded, the chain jump is made
20 grados
complete the next line and do not split into 2 lines of text.
This is the basic difference between ASCII 160 and 32, as you mention in the title of your question.
In the comparison you are making the result is false because the space characters are different after "9". For the comparison to result in true
, as the comment of @Kilbunny says, you can replace the "non-breaking" space with the blank space before comparing the strings.