From: Operating system: all PHP version: 5.3.3 Package: DOM XML related Bug Type: Bug Bug description:$DomDocumentObj->encoding should not affect xml declaration
Description:
------------
hi
consider this code:
i want to set utf-16 as internal encoding for domdocument
because source data is utf-16 encoded
$doc->encoding = "UTF-16";
but my output for web is handled by:
iconv_set_encoding("internal_encoding", "UTF-16");
iconv_set_encoding("output_encoding", "UTF-8//TRANSLIT//IGNORE");
or can be handled by
echo iconv("UTF-16", "UTF-8", $xmldata);
so the output is utf-8 encoded but the xml declaration says:
<?xml version="1.0" encoding="UTF-16"?>
so $document->encoding property should work as how it works now, but it
should not affect the xml declaration
in plus you should provide an alternative to set $xmlEncoding (make it
non-readonly)
i'm sorry for my english... i hope you accept this request!
thank you
--
Edit bug report at http://bugs.php.net/bug.php?id=52450&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52450&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52450&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=52450&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52450&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=52450&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52450&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=52450&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=52450&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=52450&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=52450&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=52450&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=52450&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=52450&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52450&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52450&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52450&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=52450&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=52450&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=52450&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=52450&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=52450&r=mysqlcfg
