When a space is not a space

I only found today that Unicode (not just HTML) also has the concept of a non-breaking space character. If you ever find something that looks like ' ' but never quite equalling ' ' then I suggest you look at their char value. 32 is the normal space character, 160 is the non-breaking space one. A few other interesting notes:

  • A non breaking space is not considered white space (in java)
  • A non breaking space is considered white space (in .Net)
  • Space is part of the normal BASIC_LATIN Unicode Block, No Break space is part of LATIN_1_SUPPLEMENT