Re: Return XML using PHP and Content-Type with UTF-8 breaks the UTF-8

From: Date: Thu, 20 Jul 2006 06:57:38 +0000
Subject: Re: Return XML using PHP and Content-Type with UTF-8 breaks the UTF-8
References: 1 2  Groups: php.general php.general 
Request: Send a blank email to php-general+get-239611@lists.php.net to get a copy of this message
Ray Hauge wrote:
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
I have tryed this. But this also breaks the UTF-8. When i put it back to text/html it works like it should :S. I Realy have no clue anymore. --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0629-1, 07/19/2006 Tested on: 7/20/2006 8:57:39 AM avast! - copyright (c) 1988-2006 ALWIL Software. http://www.avast.com

« previous php.general (#239611) next »