From: misnet at hotmail dot com Operating system: windows 2003 server PHP version: 5.0.3 PHP Bug Type: XSLT related Bug description: output conversion failed due to conv error
Description: ------------ a.xml ============================================= <?xml version="1.0" encoding="GB2312"?> <Article> <Title>test</Title> <Author>ehero</Author> <ComeFrom>Öйú</ComeFrom> <HtmlUrl>a.html</HtmlUrl> <CatalogId>2</CatalogId> <Contents><![CDATA[²âÊÔ]]></Contents> <AddTime>2005Äê</AddTime> <UpdateTime></UpdateTime> <Hits>3</Hits> <ServerFile></ServerFile> <LocalFile></LocalFile> <EncodeLocalFile></EncodeLocalFile> <PageIndex>0</PageIndex> <TotalPageNum>1</TotalPageNum> <PageUrl>a.shtml</PageUrl> </Article> ============================================= cms.xsl: ============================================= <?xml version="1.0" encoding="GB2312" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" xsl:extension-element-prefixes="php"> <xsl:output method="html" encoding="GB2312" indent="yes"/> <xsl:template match="/"> <html> ..... ============================================= s.php: ============================================= <?php $xml = new DOMDocument("1.0","GB2312"); $xml->load("a.xml"); $xsl = new DOMDocument("1.0","GB2312"); $xsl->load("cms.xsl"); $proc = new XSLTProcessor; $proc->importStyleSheet($xsl); $proc->registerPHPFunctions(); $d = $proc->transformToUri($xml,"s.xml"); ?> ============================================= When I run s.php, it will be wrong!.Below is the exception messages. Warning: output conversion failed due to conv error in D:\myphp\yibo\t.php on line 9 Warning: Bytes: 0xB5 0xEB 0x2D 0x3C in D:\myphp\yibo\t.php on line 9 I have tested $xml->load("a.xml") and $xsl->load("cms.xsl"),they are right. I can get $xml->saveXML() and $xsl->saveXML(). -- Edit bug report at http://bugs.php.net/?id=31994&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31994&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31994&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31994&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31994&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31994&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31994&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31994&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31994&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31994&r=support Expected behavior: http://bugs.php.net/fix.php?id=31994&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31994&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31994&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31994&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31994&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31994&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31994&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31994&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31994&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31994&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31994&r=mysqlcfg