Bug #71805 [NEW]: XML files can generate UTF-8 error even if they are UTF-8
| From: | goozak at gmail dot com | Date: | Fri, 11 Mar 2016 21:22:52 +0000 |
| Subject: | Bug #71805 [NEW]: XML files can generate UTF-8 error even if they are UTF-8 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-199763@lists.php.net to get a copy of this message | ||
From: goozak at gmail dot com
Operating system: Win7 SP1
PHP version: 5.5Git-2016-03-11 (snap)
Package: XML Reader
Bug Type: Bug
Bug description:XML files can generate UTF-8 error even if they are UTF-8
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 bug report at https://bugs.php.net/bug.php?id=71805&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71805&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71805&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71805&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71805&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71805&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71805&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71805&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71805&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71805&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71805&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71805&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71805&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71805&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71805&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71805&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71805&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71805&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71805&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71805&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71805&r=mysqlcfg