Php, DomDocument iso8859-1, Umlaute, saveXML
From Andreida
von: http://www.cybton.com/view_thread,DomDocument+und+Umlaute,26427,1.html
Folgender Code gibt eine Warning/Error aus, da saveXML mit dem Umlaut nicht klar kommt:
<?php
$doc = new DomDocument('1.0', 'iso-8859-1');
$documentElement = $doc->CreateElement('root');
$doc->appendChild($documentElement);
$textNode = $doc->CreateTextNode('Ein Text mit einem Umlaut: ä');
$documentElement->appendChild($textNode);
print $doc->saveXML();
?>
Lösung: utf8_encode; kein Witz :(