Bug #52450 [Opn->Bgs]: $DomDocumentObj->encoding should not affect xml declaration
| From: | rrichards@php.net | Date: | Wed, 12 Jan 2011 12:29:46 +0000 |
| Subject: | Bug #52450 [Opn->Bgs]: $DomDocumentObj->encoding should not affect xml declaration | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157845@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52450&edit=1
ID: 52450
Updated by: rrichards@php.net
Reported by: giorgio dot liscio at email dot it
Summary: $DomDocumentObj->encoding should not affect xml
declaration
-Status: Open
+Status: Bogus
Type: Bug
Package: DOM XML related
Operating System: all
PHP Version: 5.3.3
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
RTM
Previous Comments:
------------------------------------------------------------------------
[2010-09-05 10:13:11] giorgio dot liscio at email dot it
hi, can you examine my request?
thank you
------------------------------------------------------------------------
[2010-07-26 23:58:02] giorgio dot liscio at email dot it
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 this bug report at http://bugs.php.net/bug.php?id=52450&edit=1