----- Original Message -----
From: "Gabriel K" <gabriel(_dot_)klappenbach(_at_)bredband(_dot_)net>
To: "XSL-list" <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Friday, August 05, 2005 5:26 PM
Subject: [xsl] output encoding problem (can't get UTF-8)
I specify UTF-8 in my templates output element.
The transformation is done in ASP with IXSLTransform:
..
processor.input = domXML
processor.transform()
Response.write(processor.output)
The problem is that in the meta tag of the produced HTML page, there's no
encoding attribute at all.
The characters Å Ä Ö only look good when I set the brower to read the page
as ISO-8859-1. When I choose UTF-8 in the browser those characters are
questionmarks instead.
Why can't I get my output in UTF-8? It shouldn't matter what the input to
the XSL is right? Because it converts it all to Unicode in memory?
Any help would be much appreciated.
/Gabriel
Because you are using the output property incorrectly. If you don't set it it
will be a string which in ASP will always be UTF-16.
You need to set the output prior to transforming:
processor.input = domXML
processor.output = Response
processor.transform()
See here for more:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/0699dcba-7721-40cb-9faf-e76c35af8d05.asp?frame=true
--
Joe
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--