[PHP-BUG] Bug #60142 [NEW]: XSLTProcessor::transformToXML does not output UTF-8
From: Operating system: Windows PHP version: 5.3.8 Package: XSLT related Bug Type: Bug Bug description:XSLTProcessor::transformToXML does not output UTF-8 Description: XSLTProcessor::transformToXML never seem to output UTF-8 data. Bug was already reported (https://bugs.php.net/bug.php?id=36415 & https://bugs.php.net/bug.php?id=36407&edit=2) but not enough information were provided and reports were closed. So here's attached a complete test. I'm running PHP 5.3.8 VC9 + Apache 2.2.21 VC9 on Windows 7 Professional SP1. I also tested on 5.3.2 under Ubuntu 10.04.3 and it works fine. Test script: --- http://www.w3.org/1999/XSL/Transform"; version="1.0">'; $inputText = 'UTF-8 text with accents: éèà ç'; $doc = new DOMDocument('1.0', 'UTF-8'); $doc->loadHTML($inputText); $xsl = new DOMDocument('1.0', 'UTF-8'); $xsl->loadXML($xslt); $proc = new XSLTProcessor(); $proc->importStylesheet($xsl); echo $proc->transformToDoc($doc)->saveXML(); ?> Expected result: It should output (in CLI): UTF-8 text with accents: éèàç Or if displayed in browser: UTF-8 text with accents: éèà ç Actual result: -- It outputs: UTF-8 text with accents: éèà ç Or if displayed in browser: UTF-8 text with accents: éèà ç -- Edit bug report at https://bugs.php.net/bug.php?id=60142&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60142&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60142&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60142&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60142&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60142&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60142&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60142&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60142&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60142&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60142&r=support Expected behavior: https://bugs.php.net/fix.php?id=60142&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60142&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60142&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60142&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60142&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=60142&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60142&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60142&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60142&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60142&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60142&r=mysqlcfg
Bug #60142 [Opn]: XSLTProcessor::transformToXML does not output UTF-8
Edit report at https://bugs.php.net/bug.php?id=60142&edit=1 ID: 60142 User updated by:maximeraoust at gmail dot com Reported by:maximeraoust at gmail dot com Summary:XSLTProcessor::transformToXML does not output UTF-8 Status: Open Type: Bug Package:XSLT related Operating System: Windows PHP Version:5.3.8 Block user comment: N Private report: N New Comment: In the test script, you can also put: echo $proc->transformToXml(); to get the output, same result Previous Comments: [2011-10-26 16:11:10] maximeraoust at gmail dot com Description: XSLTProcessor::transformToXML never seem to output UTF-8 data. Bug was already reported (https://bugs.php.net/bug.php?id=36415 & https://bugs.php.net/bug.php?id=36407&edit=2) but not enough information were provided and reports were closed. So here's attached a complete test. I'm running PHP 5.3.8 VC9 + Apache 2.2.21 VC9 on Windows 7 Professional SP1. I also tested on 5.3.2 under Ubuntu 10.04.3 and it works fine. Test script: --- http://www.w3.org/1999/XSL/Transform"; version="1.0">'; $inputText = 'UTF-8 text with accents: éèà ç'; $doc = new DOMDocument('1.0', 'UTF-8'); $doc->loadHTML($inputText); $xsl = new DOMDocument('1.0', 'UTF-8'); $xsl->loadXML($xslt); $proc = new XSLTProcessor(); $proc->importStylesheet($xsl); echo $proc->transformToDoc($doc)->saveXML(); ?> Expected result: It should output (in CLI): UTF-8 text with accents: éèàç Or if displayed in browser: UTF-8 text with accents: éèà ç Actual result: -- It outputs: UTF-8 text with accents: éèà ç Or if displayed in browser: UTF-8 text with accents: éèà ç -- Edit this bug report at https://bugs.php.net/bug.php?id=60142&edit=1
Bug #60142 [Opn]: XSLTProcessor::transformToXML does not output UTF-8
Edit report at https://bugs.php.net/bug.php?id=60142&edit=1 ID: 60142 User updated by:maximeraoust at gmail dot com Reported by:maximeraoust at gmail dot com Summary:XSLTProcessor::transformToXML does not output UTF-8 Status: Open Type: Bug Package:XSLT related Operating System: Windows PHP Version:5.3.8 Block user comment: N Private report: N New Comment: Sorry, I obviously meant: echo $proc->transformToXml($doc); Previous Comments: [2011-10-26 16:13:01] maximeraoust at gmail dot com In the test script, you can also put: echo $proc->transformToXml(); to get the output, same result [2011-10-26 16:11:10] maximeraoust at gmail dot com Description: XSLTProcessor::transformToXML never seem to output UTF-8 data. Bug was already reported (https://bugs.php.net/bug.php?id=36415 & https://bugs.php.net/bug.php?id=36407&edit=2) but not enough information were provided and reports were closed. So here's attached a complete test. I'm running PHP 5.3.8 VC9 + Apache 2.2.21 VC9 on Windows 7 Professional SP1. I also tested on 5.3.2 under Ubuntu 10.04.3 and it works fine. Test script: --- http://www.w3.org/1999/XSL/Transform"; version="1.0">'; $inputText = 'UTF-8 text with accents: éèà ç'; $doc = new DOMDocument('1.0', 'UTF-8'); $doc->loadHTML($inputText); $xsl = new DOMDocument('1.0', 'UTF-8'); $xsl->loadXML($xslt); $proc = new XSLTProcessor(); $proc->importStylesheet($xsl); echo $proc->transformToDoc($doc)->saveXML(); ?> Expected result: It should output (in CLI): UTF-8 text with accents: éèàç Or if displayed in browser: UTF-8 text with accents: éèà ç Actual result: -- It outputs: UTF-8 text with accents: éèà ç Or if displayed in browser: UTF-8 text with accents: éèà ç -- Edit this bug report at https://bugs.php.net/bug.php?id=60142&edit=1
Bug #60142 [Opn]: XSLTProcessor::transformToXML does not output UTF-8 on Windows
Edit report at https://bugs.php.net/bug.php?id=60142&edit=1 ID: 60142 User updated by:maximeraoust at gmail dot com Reported by:maximeraoust at gmail dot com -Summary:XSLTProcessor::transformToXML does not output UTF-8 +Summary:XSLTProcessor::transformToXML does not output UTF-8 on Windows Status: Open Type: Bug Package:XSLT related Operating System: Windows PHP Version:5.3.8 Block user comment: N Private report: N New Comment: Fixed title with "Windows" Previous Comments: [2011-10-26 16:16:12] maximeraoust at gmail dot com Sorry, I obviously meant: echo $proc->transformToXml($doc); [2011-10-26 16:13:01] maximeraoust at gmail dot com In the test script, you can also put: echo $proc->transformToXml(); to get the output, same result [2011-10-26 16:11:10] maximeraoust at gmail dot com Description: XSLTProcessor::transformToXML never seem to output UTF-8 data. Bug was already reported (https://bugs.php.net/bug.php?id=36415 & https://bugs.php.net/bug.php?id=36407&edit=2) but not enough information were provided and reports were closed. So here's attached a complete test. I'm running PHP 5.3.8 VC9 + Apache 2.2.21 VC9 on Windows 7 Professional SP1. I also tested on 5.3.2 under Ubuntu 10.04.3 and it works fine. Test script: --- http://www.w3.org/1999/XSL/Transform"; version="1.0">'; $inputText = 'UTF-8 text with accents: éèà ç'; $doc = new DOMDocument('1.0', 'UTF-8'); $doc->loadHTML($inputText); $xsl = new DOMDocument('1.0', 'UTF-8'); $xsl->loadXML($xslt); $proc = new XSLTProcessor(); $proc->importStylesheet($xsl); echo $proc->transformToDoc($doc)->saveXML(); ?> Expected result: It should output (in CLI): UTF-8 text with accents: éèàç Or if displayed in browser: UTF-8 text with accents: éèà ç Actual result: -- It outputs: UTF-8 text with accents: éèà ç Or if displayed in browser: UTF-8 text with accents: éèà ç -- Edit this bug report at https://bugs.php.net/bug.php?id=60142&edit=1