[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

SV: output encoding problem (can't get UTF-8)

Subject: SV: output encoding problem (can't get UTF-8)
From: "Gabriel K" <gabriel.klappenbach@xxxxxxxxxxxx>
Date: Sun, 7 Aug 2005 12:50:24 +0200
loadxml encoding
I have tried this in the ASP:


....
set oStream = createobject("Adodb.Stream")
oStream = o.Document
call transform(oStream)


sub transform(xmlObj)
	dim domXML, domXSL, processor, template

domXML.loadXML(xmlObj)
....

But still the output of the transform is malicious like before.
Am I using this object the wrong way?


/Gabriel

> -----Ursprungligt meddelande-----
> Fren: Joe Fawcett [mailto:joefawcett@xxxxxxxxxxx]
> Skickat: den 7 augusti 2005 11:24
> Till: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Dmne: Re:  output encoding problem (can't get UTF-8)
>
> ----- Original Message -----
> From: "Gabriel K" <gabriel.klappenbach@xxxxxxxxxxxx>
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Sunday, August 07, 2005 10:03 AM
> Subject: RE:  output encoding problem (can't get UTF-8)
>
>
>
>
> > -----Ursprungligt meddelande-----
> > Fren: Joe Fawcett [mailto:joefawcett@xxxxxxxxxxx]
> > Skickat: den 7 augusti 2005 10:46
> > Till: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Dmne: Re:  output encoding problem (can't get UTF-8)
> >
> >
> > Well it seems like your com object then. When you do this
> > domXML.loadXML(o.Document)
> >
> > You are loading a UTF-16 string, is that correctly represented by the
> com
> > object? Do you have the source for the com class?
> >
> > Joe
>
> I didn't know loadXML loads a UTF-16 string.. maybe that's the problem.
> Can't I specify that I want to read it as a UTF-8 string? (sorry that this
> has turned into a non XSL-question, but still it might interest someone
> later on how this apparent XSL problem was solved).
> I don't have the code, someone else has programmed it, but that I can ask
> the programmer and also get the code if I want.
> But I believe that the com gives me UTF-8. If it's interpreted as UTF-16,
> of
> course that will be a problem. :)
> So if the com object spits out UTF-16 everything should be fine?
>
>
> /Gabriel
>
>
> Well loadXML takes a string and strings in VBScript are UTF-16 so I think
> that's
> the case. If your COM class returned DomDocument then you could use the
> load
> method and all would be well. If you can't change the internal workings of
> the
> COM class then you can load the string into an ADODB.Stream object and
> load that
> into the xmlDom. Then it won't matter about the encoding.
>
> --
>
> Joe

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.