Bug #71805 [Ver->Fbk]: XML files can generate UTF-8 error even if they are UTF-8
Edit report at https://bugs.php.net/bug.php?id=71805&edit=1
ID: 71805
Updated by: ab@php.net
Reported by: goozak at gmail dot com
Summary: XML files can generate UTF-8 error even if they are
UTF-8
-Status: Verified
+Status: Feedback
Type: Bug
Package: XML Reader
Operating System: Win7 SP1
PHP Version: 5.5Git-2016-03-11 (snap)
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
Dependency packages are upgraded. Please check the upcoming RCs.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2016-03-14 15:01:58] ab@php.net
Thanks for the report. Looks like we see a regression in libxml 2.9.3, see https://bugzilla.gnome.org/show_bug.cgi?id=760183
. No fix to this is currently available in the libxml2 repo. I'll keep an eye and will apply
this patch to our dependency base as soon as it's available.
Thanks.
------------------------------------------------------------------------
[2016-03-11 21:22:51] goozak at gmail dot com
Description:
------------
XML Reader generate error
"Warning: XMLReader::readOuterXml(): .....:5: parser error : Input is not proper UTF-8,
indicate encoding ! Bytes: 0xC3 0xA9 0x78 0x20"
even though the file is properly encoded in UTF-8.
A small change to the XML content can be made (remove a tag or even just some characters) and the
file is then read properly.
Test script:
---------------
https://gist.github.com/goozak/aa3f5bd5a146a51ddd75
Two files are used in the demo. Result will be the same if they are downloaded locally.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71805&edit=1
Thread (9 messages)