From:             guillaume dot forget at espci dot fr
Operating system: NetBSD
PHP version:      Irrelevant
PHP Bug Type:     DOM XML related
Bug description:  Using acute in DomElements

Description:
------------
Hi!

I'm using domxml function for modifying xml files.
But when I put acute (é,è,à,ô,ï,...), and try a
DomElement->set_attribute(...), the resulting dom object is truncated at
the acute place.

I do not think the problem come from the DomObj->dump_mem() or
DomObj->dump_file(...) functions because both gave the same result.
If I remove the acutes, it works fine.

Reproduce code:
---------------
$xmlfile="test.xml";
$text="c'est l'été !";
$domobj = domxml_open_file ($xmlfile);
$node = $domobj->last_child();
$test_node = $domobj->create_element("balise2");
$balise = $node->append_child($poly_node);
$balise->set_attribute (test,$text);
echo $domobj->dump_mem();

XML file (test.xml):
<?xml version="1.0" encoding="ISO-8859-1"?>
<balise1 />



Expected result:
----------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<balise1><balise2 test="c'est l'été !"/></balise1>


Actual result:
--------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<balise1>

-- 
Edit bug report at http://bugs.php.net/?id=29978&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=29978&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29978&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29978&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=29978&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=29978&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=29978&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=29978&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=29978&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=29978&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=29978&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=29978&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=29978&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=29978&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=29978&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=29978&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=29978&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=29978&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=29978&r=float

Reply via email to