#39382 [Opn->Bgs]: "Undeclared entity error" with latin1 entities
| From: | phpbugs at thequod dot de | Date: | Sat, 04 Nov 2006 21:24:48 +0000 |
| Subject: | #39382 [Opn->Bgs]: "Undeclared entity error" with latin1 entities | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104427@lists.php.net to get a copy of this message | ||
ID: 39382
User updated by: phpbugs at thequod dot de
-Summary: "Undeclared entity error"
Reported By: phpbugs at thequod dot de
-Status: Open
+Status: Bogus
Bug Type: XML related
Operating System: Ubuntu Linux
PHP Version: 5CVS-2006-11-04 (CVS)
New Comment:
I'm closing it myself.
http://bugs.php.net/bug.php?id=15092 explains why
it does
not work.
Would be interested in why it works with PHP4 though..
Previous Comments:
------------------------------------------------------------------------
[2006-11-04 20:31:15] phpbugs at thequod dot de
Description:
------------
Using a regular entity like "®" throws a "Undeclared
entity warning" error with xml_parse().
If this is bogus, please give a hint about what I'm doing
wrong.
Is this maybe a libxml problem?
btw: it also fails with other DOCTYPEs or with a full
html-head-body construct.
Reproduce code:
---------------
<?php
$xml = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<body>®</body>';
$parser = xml_parser_create();
if (!xml_parse($parser, $xml))
{
echo xml_error_string(xml_get_error_code($parser)) . "\n";
}
xml_parser_free($parser);
?>
Expected result:
----------------
Nothing.
(as with PHP4)
Actual result:
--------------
Undeclared entity warning
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39382&edit=1