Checking in fixes to xml_parser_create to specify an encoding (UTF-8)

See Eloy's bug 1927 for details.

After this checkin I'll be immediately testing some backup/restores on PHP 4.
This commit is contained in:
moodler
2004-09-13 07:42:13 +00:00
parent 41e783c3cc
commit b8a6ed644b
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);