PHP SimpleXML asXML writes ANSI encoded file
问题 I am trying to write some content into an XML file, yet I do have problems with special characters. The content I'd like to write is submitted to the script via $_GET , so I assume it is properly decoded into UTF-8 content. $write = $_GET['content']; will be fed like: file.php?content=s%F6per In the PHP I do the following: $xml = simplexml_load_file('file.xml'); $newentry = $xml -> addChild('element',$write); $xml -> asXML($xml_filename); The XML file that is opened is UTF-8 encoded. When I