From:             me at mkavel dot de
Operating system: Gentoo
PHP version:      5.2.6
PHP Bug Type:     SimpleXML related
Bug description:  Set values

Description:
------------
Some special German (latin1) caracters could not be set correctly.

The code produces different output between addCild and directly set of the
value in an existing child.

Reproduce code:
---------------
// 1
$xml->obermenue[0]->addChild("titel","<![CDATA[&Uuml;bertrumpfen]]>");

// 2
$xml->obermenue[0]->titel="<![CDATA[&Uuml;bertrumpfen]]>";


Expected result:
----------------
1:
Output: <titel>&lt;![CDATA[&Uuml;bertrumpfen]]&gt;</titel>

2:
Output: <titel>&lt;![CDATA[&Uuml;bertrumpfen]]&gt;</titel>



Actual result:
--------------
1:
Output: <titel>&lt;![CDATA[&Uuml;bertrumpfen]]&gt;</titel>

Please look at the "<" and "&" in the first Output. It changed to "&lt;"
and the "&" not change.

2:
Output: <titel>&lt;![CDATA[&amp;Uuml;bertrumpfen]]&gt;</titel>

This one the "<" changed to "&lt;" too but the "&" chnaged to "&amp;"

-- 
Edit bug report at http://bugs.php.net/?id=44917&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44917&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44917&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44917&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44917&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44917&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44917&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44917&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44917&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44917&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44917&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44917&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44917&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44917&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44917&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44917&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44917&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44917&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44917&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44917&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44917&r=mysqlcfg

Reply via email to