ID: 33375
Updated by: [EMAIL PROTECTED]
Reported By: frederic dot lecointre at burnweb dot net
-Status: Open
+Status: Verified
Bug Type: XML related
-Operating System: w2k
+Operating System: *
-PHP Version: 5.0.4
+PHP Version: 5CVS-2005-06-17
New Comment:
This also causes the pear install fail in HEAD.
And this is because we now use libxml2 instead of expat where former is
more strict perhaps?
Previous Comments:
------------------------------------------------------------------------
[2005-06-17 02:27:09] frederic dot lecointre at burnweb dot net
Description:
------------
xml_parse return invalid character error with ISO-8859-1 data.
Reproduce code:
---------------
<?php
function startElement($parser, $name, $attribs){return true;}
function endElement($parser, $name){return true;}
$xml_string = '
<head>
<title>Frédéric</title>
</head>
';
$xml_parser = xml_parser_create('ISO-8859-1');
xml_set_element_handler($xml_parser, "startElement", "endElement");
if (!xml_parse($xml_parser, $xml_string, true)) {
die(sprintf("error : %s at line %d col %d\n",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser),
xml_get_current_column_number($xml_parser)));
}
?>
Actual result:
--------------
error : Invalid character at line 3 col 20
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33375&edit=1