ID:               44297
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jaap dot taal at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         XSLT related
 Operating System: Windows
 PHP Version:      5.2.5
 New Comment:

It's not the XSLT extension, which sends the COntent-Type header. It's
- 
at the end - apache, so if you don't tell apache (via php), which 
content type it should use, it takes the default one.. And that is 
obviously different from what you expect :)


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

[2008-02-29 22:28:33] jaap dot taal at gmail dot com

Description:
------------
When I execute the code on linux the dash (&#8211) is shown as a dash.
This is because PHP adds a "Content-Type: text/html; charset=UTF-8"
header (used firebug to view the info).
On my windows installation, however, the header isn't modified so my
browser is displaying "–" instead of a dash.

Manually adding the header works, but it's only a workaround.

I've found a similar bugreport from two years:
http://bugs.php.net/bug.php?id=36415

Reproduce code:
---------------
<?php
$xml = "<mytag>&amp;#8211 is a dash: &quot;&#8211;&quot;</mytag>";
$xmldoc = new DOMDocument();
$xmldoc->loadXML($xml);
$xsl = '<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform";
version="1.0"/>';
$xsldoc = new DOMDocument();
$xsldoc->loadXML($xsl);
$proc = new XSLTProcessor();
$proc->importStylesheet($xsldoc);
echo $proc->transformToXML($xmldoc);
?>

Expected result:
----------------
&#8211 is a dash: "–"

Actual result:
--------------
&#8211 is a dash: "–"


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


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

Reply via email to