tjrobinson.net

Beware of non-breaking spaces in your HOSTS file

February 24, 2013

I recently had some problems with HOSTS file entries that were being ignored. When viewed in most text editors it looked correct, but what looked like harmless whitespace was actually a non-breaking space (Decimal 160 or Hex A0). Although you can use tabs or spaces to separate the IP address from the hostname in HOSTS file, it treats non-breaking spaces as part of the hostname and therefore doesn’t work as expected.


Tom Robinson

I'm a software developer and this is my technology and coding blog.