Bug #74236 [Com]: XMLReader fails to read file

From: Date: Sat, 11 Mar 2017 01:15:01 +0000
Subject: Bug #74236 [Com]: XMLReader fails to read file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207779@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74236&edit=1 ID: 74236 Comment by: andrey at kostin dot info Reported by: andrey at kostin dot info Summary: XMLReader fails to read file Status: Open Type: Bug Package: XML Reader Operating System: Ubuntu 16.04 PHP Version: 7.1.2 Block user comment: N Private report: N New Comment: Links: https://kostin.info/bug1.xml https://kostin.info/bug2.xml Previous Comments: ------------------------------------------------------------------------ [2017-03-11 01:12:50] andrey at kostin dot info Description: ------------ There are two xml files. The only difference between them is a one whitespace character in a row of ten whitespace characters. One file XMLReader processes with no problem, another one can't be read. It works fine in PHP 5.5.35 for both files. Test script: --------------- <?php $filename = 'bug1.xml'; $xml = new \XMLReader(); $xml->open($filename); while ($xml->read()) {} echo 'ok'; Expected result: ---------------- ok Actual result: -------------- PHP Warning: XMLReader::read(): /web/www/r24/r24.ua/bug1.xml:95: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xD1 0x85 0x2E 0x20 in /web/www/r24/r24.ua/bug.php on line 8 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74236&edit=1

« previous php.bugs (#207779) next »