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

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

Subject: RE: output encoding problem (can't get UTF-8)
From: "Gabriel K" <gabriel.klappenbach@xxxxxxxxxxxx>
Date: Sun, 7 Aug 2005 20:35:53 +0200
ostream.type
Ok now I get the document, but guess what: same problem is still there in
the output! Characters E D V look the same crap as before...

set oStream = createobject("Adodb.Stream")
oStream.Type = 2
oStream.Charset = "UTF-8"
oStream.open
oStream.writeText o.document
oStream.position = 0
call transform(oStream)

sub transform(oStream)
   xmlDom.load(oStream)

And if I set charset to something else than "UTF-8", or don't specify it at
all (then it probably defaults to Unicode)I get the error (when loading the
XML):
" Switch from current encoding to specified encoding not supported. '<?xml
version="1.0" encoding="utf-8"?>'"

So I'm really lost now.... there's no problem loading the XML document as
UTF-8, so that's what the IXSLProcessor should have to do the transform
on... XSL should then work in Unicode and output it as specied in the
outermost stylesheet (UTF-8).

Is there anything I can try?

/Gabriel


> -----Ursprungligt meddelande-----
> Fren: Joe Fawcett [mailto:joefawcett@xxxxxxxxxxx]
> Skickat: den 7 augusti 2005 19:41
> 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 3:53 PM
> Subject: RE:  output encoding problem (can't get UTF-8)
>
>
> I have problems getting this to work.
> When I try to load the XML, MSXML reports the following error:
> "XML document must have a top level element"
>
> This suggests that it can't read the stream properly.
>
> Do you think it matters that the oStream object is passed as a parameter
> in
> a function before it is used in xmlDom.load?
>
> I'm now using:
>
> set oStream = createobject("Adodb.Stream")
> oStream.Type = 2
> oStream.Charset = "Unicode"
> oStream.open
> oStream.writeText o.document
> xmlDom.load(oStream)
>
> (oStream is passed as a sub parameter first though)
> I have also tried writing binary (type = 1 and oStream.write), and charset
> =
> "UTF-8".
>
> Any suggestions?
>
> /Gabriel
>
> After writing to the stream set the position to the start:
> oStream.position = 0
>
> 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.