Merged XML UTF-8 fixed from stable (see bug 1927)

This commit is contained in:
moodler
2004-09-13 08:17:09 +00:00
parent f02511d686
commit b797605898
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -20,11 +20,11 @@
*
*/
function xmlize($data, $WHITE=1) {
function xmlize($data, $WHITE=1, $encoding='UTF-8') {
$data = trim($data);
$vals = $index = $array = array();
$parser = xml_parser_create();
$parser = xml_parser_create($encoding);
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, $WHITE);
xml_parse_into_struct($parser, $data, $vals, $index);