An xml document is transformed using a xslt stylesheet. In Safari, unicode characters from the source document like "י" display as "ֳ©". Occurs only when output is set to "html" in the xslt. Using the debug menu in Safari, the DOM TREE shows wrong characters. Using in OS 10.4.1 terminal the following command outputs the right html (i.e with "יייי ... "): xsltproc test.xml My conclusion is that it is not a libxslt bug. Documents used for the test: -------- test.xml----------- <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <TEST>CHARACTERS IN SOURCE XML: ייייייייייייייייייייייייייייי</TEST> ---------------------------- -------- test.xsl----------- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" encoding="UTF-8"/> <xsl:template match="TEST"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> CHARACTERS IN XSLT: ייייייייייי <br/> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template > <xsl:value-of select="." /> </xsl:template> </xsl:stylesheet> ----------------------------
Created attachment 2226 [details] xml and xslt files used for the test
Added URL to a xml file that shows the problem
Please have a look at this one .... I think it is a serious one and I doubt it is related to other XSLT bugs already known. Tested with webkit 412 and 412+ You can see it with a reduced example: http://perso.netpratique.fr/escoz/webkit/xslt_unicode.xml
Comment on attachment 2226 [details] xml and xslt files used for the test Can anyone just tell me if this is a bug or if I am having hallucinations ?
This is also filed as <rdar://4110507>.
I think this is caused by bug 3809.
I can still reproduce this now, with 3809 having been fixed in ToT.
Created attachment 3928 [details] proposed patch The changes in CachedXSLStyleSheet could also be applied to CachedXBLDocument below - I didn't modify that because I'm not sure if it is ever used, and haven't got a test case.
Comment on attachment 3928 [details] proposed patch The patch looks fine. I'm not sure I fully understand the use of Decoder (I'm not familiar with the class). Regardless, before we can land this we will require additional layout-tests to validate the changes. Marking review:- until the layout tests are attached (then you can remark this patch as ?).
The test case attached is fine, but you shoudl turn it into a layout test (find the proper place in the layout test tree) and add it to your original patch.
Created attachment 3929 [details] test cases (the original test case is included here)
Comment on attachment 3928 [details] proposed patch Looks good, r=me.
I committed this fix.
*** Bug 5282 has been marked as a duplicate of this bug. ***