From:             patrick dot lanove at telenet dot be
Operating system: Windows XP
PHP version:      4.4.8
PHP Bug Type:     DOM XML related
Bug description:  dump_file character conversion

Description:
------------
Might have found a bug in this function.
When the document pased contains special characters like é,è,à...
some level of character conversion is done in the output.

Also, special characters pased as filename are omitted in the outputed
filename.

The string 'ét ' in the reproduction code is converted to unicode
character/CJK Unified Ideographs 9D20 (decimal: 40194).

loaded modules:
php_domxml
php_iconv

Apache version 2.2.3

in some other bugreports, it was said dump_file calls on functions from
libxml12, there is no such file in php's dir.

Reproduce code:
---------------
$doc = domxml_new_doc('1.0');
$root = $doc->create_element('HTML');
$root = $doc->append_child($root);
$head = $doc->create_element('HEAD');
$head = $root->append_child($head);
$title = $doc->create_element('TITLE');
$title = $head->append_child($title);
$text = $doc->create_text_node('This is yét another title');
$text = $title->append_child($text);
    
$path = 'some_absolute_path';
$filename = 'bugtést3.xml';
$doc->dump_file($path . '/' . $filename, false, true);

Expected result:
----------------
filename: bugtést3.xml
<?xml version="1.0"?>
<HTML>
  <HEAD>
    <TITLE>This is a title</TITLE>
  </HEAD>
</HTML>

Actual result:
--------------
filename: bugtst3.xml
<?xml version="1.0"?>
<HTML>
  <HEAD>
    <TITLE>This is y&#x9D20;another title</TITLE>
  </HEAD>
</HTML>

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

Reply via email to