ID: 28383
User updated by: pog at grumpf dot net
Reported By: pog at grumpf dot net
Status: Open
Bug Type: DOM XML related
Operating System: FreeBSD 4.10-RC
PHP Version: 4.3.6
New Comment:
have problem on :
--
FreeBSD 4.10-rc apache 2.0.49 php 4.3.6
domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20608
HTML Support enabled
XPath Support enabled
XPointer Support enabled
DOM/XSLT enabled
libxslt Version 1.1.6
libxslt compiled against libxml Version 2.6.8
DOM/EXSLT enabled
libexslt Version 1.1.6
--
linux 2.4.21 apache 2.0.46 php 4.3.6
domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20507
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Previous Comments:
------------------------------------------------------------------------
[2004-05-13 11:31:02] pog at grumpf dot net
Description:
------------
I got warning/error using dump_mem(true,'ISO-8859-1') and accentuation
put a '�/�/�/�' or any accent char and press 'go'
that crash converter
$xmlDoc->dump_mem(true, 'ISO-8859-1');
Reproduce code:
---------------
<?
if (!isset ($submit)) { ?>
<form action="<?php echo $SCRIPT_NAME ?>" method="POST">
champ1 : <input type="text" name="txt1" /><br/>
champ2 : <input type="text" name="txt2" /><br/>
champ3 : <input type="text" name="txt3" /><br/>
<input type="submit" name="submit" value="go" /><br/>
</form>
<?
} else {
$xmlDoc = domxml_new_doc('1.0');
$root = $xmlDoc->add_root("root");
while(list($key, $value) = each($HTTP_POST_VARS)) {
$nodeName = $root->new_child($key, $value);
};
echo $xmlDoc->dump_mem(true, 'ISO-8859-1');
};
?>
Expected result:
----------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
<txt1>�</txt1>
<txt2></txt2>
<txt3></txt3>
<submit>go</submit>
</root>
Actual result:
--------------
Warning: dump_mem(): output conversion failed due to conv error in
/usr/home/pog/public_html/test/form2.php on line 17
Warning: dump_mem(): Bytes: 0xE9 0x3C 0x2F 0x74 in
/usr/home/pog/public_html/test/form2.php on line 17
Warning: dump_mem(): encoder error in
/usr/home/pog/public_html/test/form2.php on line 17
if you look at html source:
<br />
<b>Warning</b>: dump_mem(): output conversion failed due to conv
error
in <b>/usr/home/pog/public_html/test/form2.php</b> on line
<b>17</b><br />
<br />
<b>Warning</b>: dump_mem(): Bytes: 0xE9 0x3C 0x2F 0x74
in <b>/usr/home/pog/public_html/test/form2.php</b> on line
<b>17</b><br />
<br />
<b>Warning</b>: dump_mem(): encoder error in
<b>/usr/home/pog/public_html/test/form2.php</b> on line <b>17</b><br
/>
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
<txt1>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28383&edit=1