Re: Return XML using PHP and Content-Type with UTF-8 breaks the UTF-8
| From: | Ray Hauge | Date: | Wed, 19 Jul 2006 15:27:16 +0000 |
| Subject: | Re: Return XML using PHP and Content-Type with UTF-8 breaks the UTF-8 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239576@lists.php.net to get a copy of this message | ||
On Wednesday 19 July 2006 09:27, Mathijs wrote:
> Hello there,
>
> I Have an problem with UTF-8 and XML.
>
> I Output perfect XML (according to IE, Opera and Firefox).
> I use the Content-Type header with "text/xml; charset=utf-8".
> For some reason this breaks UTF-8 output.
> When i remove it it works. But i need the text/xml header.
>
> If i save an document as .xml with the same contents as UTF-8 it works.
>
> Is this a known problem?
>
> Thx in advanced.
I would try just specifying UTF-8 in the XML header, and remove the charset
from the content-type header, and just have the text/xml.
<?xml version="1.0" encoding="utf-8"?>
HTH
--
Ray Hauge
Programmer/Systems Administrator
American Student Loan Services
www.americanstudentloan.com
1.800.575.1099