ID:               31909
 Updated by:       [EMAIL PROTECTED]
 Reported By:      misnet at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         DOM XML related
 Operating System: windows server 2003
 PHP Version:      5.0.3
 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.

Input always has to be utf-8, for example for createElement() (only
exceptions are load() and loadXML()). You have to convert that to UTF-8
before putting it into dom.

The second parameter of the constructor is for the output encoding.


Previous Comments:
------------------------------------------------------------------------

[2005-02-10 03:53:42] misnet at hotmail dot com

Description:
------------
$dom = new DOMDocument("1.0","gb2312");
$rootElement = $dom->createElement("Article");
$rootElement->appendChild($dom->createElement("Title",$title);
echo $dom->saveXML();
------------------
Run result is wrong!
If "$title" is utf-8 code, it can be right! 
In the DOMDocument construction, I use gb2312 charset,the $title should
be gb2312 code.But in the fact, I have to use utf-8,otherwise it will be
wrong!
why? 




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31909&edit=1

Reply via email to