#26650 [Opn->Fbk]: Decimal entities
| From: | sniper@php.net | Date: | Thu, 18 Dec 2003 08:11:28 +0000 |
| Subject: | #26650 [Opn->Fbk]: Decimal entities | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52241@lists.php.net to get a copy of this message | ||
ID: 26650
Updated by: sniper@php.net
Reported By: msw at seebi dot de
-Status: Open
+Status: Feedback
Bug Type: DOM XML related
Operating System: Win XP Prof
PHP Version: 4.3.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-12-17 10:18:16] msw at seebi dot de
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 this bug report at http://bugs.php.net/?id=26650&edit=1