Subject: SV: [xsl] output encoding problem (can't get UTF-8) From: "Gabriel K" <gabriel.klappenbach@xxxxxxxxxxxx> Date: Fri, 5 Aug 2005 19:02:51 +0200 |
Yes, I just found a page explaining that, and using it like you specified now it outputs UTF-8 correctly, with the charset attribute in the META tag set to UTF-8 as well. Now I have a follow up question. I get an UTF-8 encoded XML document that I load into a DOM object and then transform (the "domXML" below). The xml is this: http://gabbah.no-ip.org/mirakel/default.asp?ctype=STP&cdoc=object&cnMaxRows= 10&cnBookmark=H2856&cpKNP=*&transform=no So everything looks fine, the XML is UTF-8, the transformation outputs UTF-8. BUT, the characters E D V in the xml-file are encoded and I can't get them to look correct no matter what encoding I choose in the browser. I don't understand why this is happening in the transformation! I mean if everything is UTF-8 it should work fine right? The result is this: http://gabbah.no-ip.org/mirakel/default.asp?ctype=KSP&cdoc=searchList&cpKNP= *%C3%85*&cpADR=&cpSTN=&cnMaxRows=10 Any hints on what's happening? /Gabriel > -----Ursprungligt meddelande----- > Fren: Joe Fawcett [mailto:joefawcett@xxxxxxxxxxx] > Skickat: den 5 augusti 2005 18:40 > Till: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Dmne: Re: [xsl] output encoding problem (can't get UTF-8) > > ----- Original Message ----- > From: "Gabriel K" <gabriel.klappenbach@xxxxxxxxxxxx> > To: "XSL-list" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> > 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 E D V 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] output encoding problem (, Joe Fawcett | Thread | Re: [xsl] output encoding problem (, Joe Fawcett |
Re: [xsl] output encoding problem (, Joe Fawcett | Date | RE: [xsl] Measure the length of an , Mauritz Jeanson |
Month |