From: misnet at hotmail dot com Operating system: windows server 2003 PHP version: 5.0.3 PHP Bug Type: DOM XML related Bug description: can't support gb2312 charset
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 bug report at http://bugs.php.net/?id=31909&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31909&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31909&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31909&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31909&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31909&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31909&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31909&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31909&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31909&r=support Expected behavior: http://bugs.php.net/fix.php?id=31909&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31909&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31909&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31909&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31909&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31909&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31909&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31909&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31909&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31909&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31909&r=mysqlcfg