UTF-8 Conversion
Brought to you by:
bs_php,
nigelswinson
New php5 versions do handle the xml parser encoding automaticly and strange effects can occur by using special chars (e.g. german umlaute).
by setting the output encoding in the xml_parser_create call the desired (old) behaviour can be restored:
in
function importFromString
change
// Create an XML parser.
$parser = xml_parser_create();
to
// Create an XML parser.
$parser = xml_parser_create("ISO-8859-1");
Logged In: YES
user_id=291383
Originator: NO
You should consider using
new XPath('path/to/file.xml', array(XML_OPTION_TARGET_ENCODING => "ISO-8859-1"));
instead of editing the library code.
Kind regards
Torben