Altova Mailing List Archives


Re: [xsl] Re: Re: Microsoft.XMLDOM UTF-8 Encoding!

From: "[Tech]" <tech@----------->
To:
Date: 7/12/2003 8:15:00 AM
...

I tell again I DONT have problems with that.
Your url
(http://www.biglist.com/lists/xsl-list/archives/200108/msg00541.html) deal
with LOAD. I load what I want (ISO-iso-8859-1, UTF-8, Windows-1251) without
any problems! My work are OK!! with dom.transformNode(xsl)) All utf-8
caracter are OK (*even if it's utf-16)!

My request it's so simple, How browser can open that UTF-8 encoding without
problem?
No ASP, NO SERVER SIDE PARSE, no css, JUST ONE xml/xsl direct on IE or
Mozilla.

Try our self : http://www.trucsweb.com/rss/sauve3.asp
NOTE :   &Atilde;&copy;&Atilde;&copy;&Atilde;&copy; are UTF-8 encoding

All code :

My XML (utf-8 encoding)
alone direct in IE or Mozilla browser
(dont work)
======================
<?xml version="1.0" encoding="UTF-8"?>
<test>
   &Atilde;&copy;&Atilde;&copy;&Atilde;&copy;
</test>

My XML (utf-8 encoding) with XSL
direct in IE or Mozilla browser
(dont work)
=========================
// utf.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="utf.xsl"?>
<test>
   &Atilde;&copy;&Atilde;&copy;&Atilde;&copy;
</test>

My XSL
=========
// utf.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="html" encoding="UTF-8"/>

 <xsl:template match="/">
    <xsl:copy-of select="." />
 </xsl:template>

</xsl:stylesheet>

My XML/XSL (utf-8 encoding) parse with ASP "ransformNode"
==>> (WORK PERFECTLY!!!)
============================
  set xml = Server.CreateObject("Msxml2.DOMDocument.4.0")
  xml.async = false
    xml.load(Server.MapPath("utf.xml"))
    set xsl = Server.CreateObject("Msxml2.DOMDocument.4.0")
    xsl.async = false
      xsl.load(Server.MapPath("utf.xsl"))
      Response.Write("Result with xml.transformNode(xsl) work good!")
      Response.Write(twParse(xml.transformNode(xsl)))
    set xsl = nothing
  set xml = nothing

Tx
----- Original Message ----- 
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Saturday, July 12, 2003 11:19 AM
Subject: [xsl] Re: Re: Microsoft.XMLDOM UTF-8 Encoding!


>
> "[Tech]" <tech@xxxxxxxxxxx> wrote in message
> news:011601c34875$ef9aa9d0$0200a8c0@xxxxxxx
> > Ok, you just dont understand my poor english!
> > I dont have problem with load or parse !!!!!
> > Tx for you time.
>
> It is not at all your English. In your previous message you wrote:
>
> > I dont have problem to parse the XML. All caracters are UTF-8 encoding.
> > So response.write(dom.transformNode(xsl)) show the writh thing!
>
>
> You are using the transformNode() method. It is returning a BSTR and this
is
> UTF-16.
>
> Regardless of whatever you do the output will be UTF-16.
>
> As I already pointed out, the solution is to use transformNodeToObject()
and
> pass to it the response object as parameter, or to use IXSLProcessor and
set
> its output property to the response object.
>
>
> This must have been put in the xslt-FAQ, but I didn't find it there:
>
> http://www.biglist.com/lists/xsl-list/archives/200108/msg00541.html
>
>
> =====
> Cheers,
>
> Dimitre Novatchev.
> http://fxsl.sourceforge.net/ -- the home of FXSL
>
>
>
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.