+4  A: 

Try to replace your static text to this one:

"HTTP/1.0 200 OK\r\n"
"Server: UIP/1.0 (http://www.something.com/)\r\n"
"Content-type: text/html; charset=utf-8\r\n"

NOTE : the backslash ('\') character is an esacpe character, in your static string, you did "\h" with your "text\html"

NOTE : The "charset=utf-8" part is only useful if your files are utf-8 encode

Yanick Rochon
This is it. except it turns out I need charset=iso-8859-1 (latin1).
Warren P
I think it's just BRILLIANT that this worked fine with Opera but nobody else, but that suddenly the latest browsers change their default encode-detection algorithms.
Warren P
that backslash thing... DOH!!!!! thanks.
Warren P
yes, ISO-8859-1 if your files are latin1 encoded (mostly in Windows). Though ISO-8859-1 doesn't support foreign characters without using html entities and char codes; this is why using utf-8 is far better. Glad it worked :)
Yanick Rochon