From: craig at skrabacz dot com Operating system: Windows XP PHP version: 4.4.4 PHP Bug Type: XSLT related Bug description: Transform element ( ) incorrectly
Description: ------------ call to xslt_process() transforms non-breaking space incorrectly. Reproduce code: --------------- $xslt = xslt_create(); $xmlFile = "/../data/pictures.xml"; $xslFile = "picturePage.xsl"; xslt_set_encoding($xslt, 'UTF-8'); $parameters = array ( 'linkKey' => $_GET['page'] ); $transformed = xslt_process($xslt, $xmlFile, $xslFile, NULL ,NULL, $parameters); if ($transformed) { echo $transformed; } else { echo "Error Transforming pictures.xml by applying picturePage.xslt into employee.html"; echo "<BR>Error description " . xslt_error($xslt); echo "<BR>Error code " . xslt_errno($xslt); } xslt_free($xslt); <---------> XSL: <xsl:template match="picture" mode="link"> <xsl:element name="a"> <xsl:attribute name="class">RegLink</xsl:attribute> <xsl:attribute name="href">picture.html?picture=<xsl:value-of select="../@path"/>/<xsl:value-of select="@file"/></xsl:attribute> <xsl:apply-templates select="." mode="thumb"/> </xsl:element>  </xsl:template> Expected result: ---------------- formatted transformation with non-breaking space between images. Actual result: -------------- transformation with "Â" instead of non-breaking space. -- Edit bug report at http://bugs.php.net/?id=39377&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39377&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39377&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39377&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39377&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39377&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39377&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39377&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39377&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39377&r=support Expected behavior: http://bugs.php.net/fix.php?id=39377&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39377&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39377&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39377&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39377&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39377&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39377&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39377&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39377&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39377&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39377&r=mysqlcfg