ID: 31139 User updated by: exaton at free dot fr -Summary: No longer parses "&" Reported By: exaton at free dot fr Status: Open Bug Type: XML related Operating System: Windows XP PHP Version: 5.0.3 New Comment:
(gave a more explicit title) Previous Comments: ------------------------------------------------------------------------ [2004-12-16 23:06:24] exaton at free dot fr Description: ------------ I parse my XML with the "XML parser functions" (xml_parser_create() and all that). Up to PHP 5.0.2 I had no problem, and suddenly the following has appeared in 5.0.3 : I used to put é in an XML file to recuperate the é HTML entity in my page output and therefore an acute-accentuated e in the text. This was perfectly coherent with XML specs, and worked fine. Now the output on the page has simply dropped the "&" that should come from & , therefore parsing é into eacute; -- which of course is perfectly unwanted. é is of course not the only affected entity : I'm not seeing a single & in any content obtained from parsing XML. Note : explicitely passing a charset string to xml_parser_create() did not solve this. Reproduce code: --------------- $this -> parser = xml_parser_create(); xml_parser_set_option($this -> parser, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($this -> parser, XML_OPTION_CASE_FOLDING, 0); // $this -> contents has the plaintext contents of an XML file, prone to contain things like é xml_parse_into_struct($this -> parser, $this -> contents, $this -> values, $this -> index); xml_parser_free($this -> parser); Expected result: ---------------- When I eventually recuperate the output with my custom architecture, I expect things like é to have been parsed into é -- they always were up to and including PHP 5.0.2 . Actual result: -------------- In PHP 5.0.3, é for example is now parsed into eacute; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31139&edit=1