#33375 [Ver]: xml_parse return invalid character error with ISO-8859-1 data

From: Date: Fri, 17 Jun 2005 08:41:24 +0000
Subject: #33375 [Ver]: xml_parse return invalid character error with ISO-8859-1 data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-80517@lists.php.net to get a copy of this message
ID: 33375 User updated by: frederic dot lecointre at burnweb dot net Reported By: frederic dot lecointre at burnweb dot net Status: Verified Bug Type: XML related Operating System: * PHP Version: 5CVS-2005-06-17 New Comment: hi, there's no more or less strict! ISO-8859-1 is ISO-8859-1 ! is there an active maintener for this extension ? Previous Comments: ------------------------------------------------------------------------ [2005-06-17 10:20:52] sniper@php.net 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? ------------------------------------------------------------------------ [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

« previous php.bugs (#80517) next »