|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2004-05-13 13:30 UTC] pog at grumpf dot net
  [2004-05-15 13:03 UTC] rrichards@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 09:00:01 2025 UTC | 
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>