#28383 [Opn->Bgs]: error/warning using dump_mem() and ISO-8859-1
| From: | rrichards@php.net | Date: | Sat, 15 May 2004 11:03:48 +0000 |
| Subject: | #28383 [Opn->Bgs]: error/warning using dump_mem() and ISO-8859-1 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-59656@lists.php.net to get a copy of this message | ||
ID: 28383
Updated by: rrichards@php.net
Reported By: pog at grumpf dot net
-Status: Open
+Status: Bogus
Bug Type: DOM XML related
Operating System: FreeBSD 4.10-RC
PHP Version: 4.3.6
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2004-05-13 13:30:30] pog at grumpf dot net
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
------------------------------------------------------------------------
[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