[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: MS IXSLProcessor input encoding
> processor.input = oStream > processor.input = domXML This causes the IXSLProcessor instance to use domXML as input -- not oStream. Cheers, Dimitre Novatchev On 8/23/05, Gabriel K <gabriel.klappenbach@xxxxxxxxxxxx> wrote: > Ok, here it is. I have a COM object that feeds me the XML. So o.document > contains the XML in UTF-8. > > ' setup XML-server ----------------------------------- > dim o > set o = Server.CreateObject("MwebbCOM.MwebbCOM.1") > o.httpRemoteUser = Request.ServerVariables("REMOTE_USER") > o.httpRemoteAddr = Request.ServerVariables("REMOTE_ADDR") > o.httpQueryString = Request.QueryString > o.BeginTransaction > > ' setup ADODB Stream -------------------------------- > dim oStream > set oStream = createobject("Adodb.Stream") > oStream.Type = 2 > oStream.Charset = "UTF-8" > oStream.open > oStream.writeText o.document > oStream.position = 0 > > <some irrelevant code> > > ' output with IXSLProcessor -------------------------- > Set template = Server.CreateObject("MSXML2.XSLTemplate.5.0") > template.stylesheet = domXSL > set processor = template.createProcessor() > processor.input = oStream > processor.input = domXML > processor.output = Response > processor.transform() > > > The problem is that processor.input reads o.document as an ISO-8859-1 > document, instead of UTF-8. > The XML-file has declared UTF-8 and is indeed UTF-8 encoded. > > > /Gabriel > > > > > -----Ursprungligt meddelande----- > > Fren: Emmanouil Batsis [mailto:Emmanouil.Batsis@xxxxxxxxxxx] > > Skickat: den 22 augusti 2005 14:14 > > Till: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > Dmne: Re: MS IXSLProcessor input encoding > > > > Gabriel K wrote: > > > > >After some investigation I have come to the conclusion that IXSLProcessor > > >always reads it input in ISO-8859-1 (it could also be windows 1252), > > >regardless of any declarations in ado Stream, XML-file or Byte Order > > Mark. > > > > > >Does anyone agree or disagree with that? > > > > > > > > > > The XML parser is responsible for that. If your XML file has a proper > > encoding, the parser should be able to read it properly if that belongs > > to the mandatory encodings (UTF-8 for example, also the default). I am > > sure ppl will have some advice if you demonstrate the code you use to > > read the XML, but in general this is irrelevant to XSL. > > > > hth, > > > > Manos > > -- Cheers, Dimitre Novatchev --------------------------------------- Harry did not ask how Dumbledore knew; ...but Harry had long since learned that bangs and smoke were more often the marks of ineptitude than expertise.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|