ID:               36407
 Updated by:       [EMAIL PROTECTED]
 Reported By:      memoimyself at yahoo dot com dot br
-Status:           Feedback
+Status:           Bogus
 Bug Type:         XSLT related
 Operating System: Windows XP
 PHP Version:      5.1.2
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

duped #36415


Previous Comments:
------------------------------------------------------------------------

[2006-02-16 11:15:39] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Need xml doc and stylesheet you are using

------------------------------------------------------------------------

[2006-02-16 02:10:23] memoimyself at yahoo dot com dot br

Description:
------------
I have an XSL file to transform XML documents; the XSL and all XML
files are encoded in UTF-8. My PHP script is in a file also encoded in
UTF-8. The data is retrieved from a database (MySQL 5) whose character
set is UTF-8 and whose tables all have UTF-8 as their character set as
well. All the strings in all the tables are duly encoded in UTF-8.
Prior to data retrieval, the query 'SET NAMES "utf8"' is run to ensure
that all i/o operations use the same character set (UTF-8). (Hope I've
been thorough enough!)

Now, my XSL file has the following top-level (child node of the
document element, as it should be) element:

<xsl:output encoding="utf-8" method="html"/>

The transformation is performed by the transformToXML method of the
XSLTProcessor class.

When the code is run on a Windows server (Win XP, Apache 2.0.55,PHP
5.1.2), the result of the transformation is NEVER UTF-8 (always
iso-8859-1), even if I chage 'method' to 'xml', and even if I use a
'media-type' attribute.

When run on a Linux server (PHP 5.1.2 as well), everything goes well.

Reproduce code:
---------------
$xml = new DOMDocument('1.0', 'UTF-8');
$xml->loadXML($row->Report);

$xsl = new DOMDocument('1.0', 'UTF-8');
$xsl->load($xsl_file);

$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl);

$report = $proc->transformToXML($xml);

Expected result:
----------------
Output string should be encoded in UTF-8.

Actual result:
--------------
Output string in NOT encoded in UTF-8 and accented characters appear
garbled. This problem only occurs under Windows.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36407&edit=1

Reply via email to