|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-02-10 09:51 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 20:00:01 2025 UTC |
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?