From: msw at seebi dot de
Operating system: Win XP Prof
PHP version: 4.3.4
PHP Bug Type: DOM XML related
Bug description: Decimal entities
Description:
------------
When I'm producing a new xml file (domxml_new_doc()) which contains some
decimal entities (e.g. for the german characters ß Ä ö and
so on) and saving this file to disk (dump_file()) each character '&' in
each decimal entity is converted into &. This appears with PHP 4.3.0
and 4.3.4 (Win). PHP 4.3.1, 4.3.2 and 4.3.3 not tested.
Reproduce code:
---------------
<?php
$content="ß - Ä";
$dom = domxml_new_doc("1.0");
$root = $dom->add_root("list");
$ab=$dom->create_element("absatz");
$ab->set_attribute("id","10");
$text=$dom->create_element("text");
$content=$dom->create_text_node($content);
$text->append_child($content);
$ab->append_child($text);
$root->append_child($ab);
$dom->dump_file("test.xml", false, false);
?>
Expected result:
----------------
the file test.xml should look like this:
<?xml version="1.0"?>
<list><absatz id="10"><text>ß -Ä</text></absatz></list>
Actual result:
--------------
The actual result is:
<?xml version="1.0"?>
<list><absatz id="10"><text>&#223; -&#196;</text></absatz></list>
--
Edit bug report at http://bugs.php.net/?id=26650&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26650&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26650&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26650&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26650&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26650&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26650&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26650&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26650&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26650&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26650&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26650&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26650&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26650&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26650&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26650&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26650&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26650&r=float