Forum Moderators: coopster
I have a big prob.
I have a page which post some input.
This input can be UTF-8 like chinese or other utf-8 chars.
Also i need it to return UTF-8 and it has to be xml.
For some strange reason this isn't working.
Small example.
<?php
header('Content-Type: text/xml; charset=utf-8');
print '<?xml version="1.0" encoding="utf-8"?>'."\n";
print '<test><data>'.$_GET['test'].'</data></test>'."\n";
?>
This will break it..
Only Opera does a good job. Firefox and IE both can't handle it.
If i remove the header Firefox goes well.
IE Still can't handle it.
I Just need simple XML with UTF8 data.
Thx in advance.
Firstly, is the data really saved in UTF-8? If it is saved as windows-1252 but served as UTF-8, then it will cause an error.
Secondly, what HTTP headers are actually being set by the server when handling the file request? (you can check in Firefox with Ctrl+I).