Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
January 30, 2009, 10:39 pm
rate this thread
(The latter should be ISO-8859-1)
It's an encoding mismatch. XML uses UTF-8 by definition. The non-
breaking space has the Unicode U+00A0, which is 0xC2A0 if encoded
as UTF-8. If you now interpret this 2-byte sequence as ISO-8859-1 or -7,
you'll get results like above: 0xC2 in ISO-8859-1 is "Â", in ISO-8859-7
it's "B". 0xA0 is the non-breaking space in both encodings.
If you use
header('Content-Type: text/html; charset=utf-8')
you'll get the correct result. Of course you can also convert the output
to another encoding if necessary, before it is sent to the browser.
- » Why wont my script mail in explorer, but ok in Firefox?
- — Next thread in » PHP Scripting Forum