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

Re: Microsoft.XMLDOM UTF-8 Encoding!

Subject: Re: Microsoft.XMLDOM UTF-8 Encoding!
From: "[Tech]" <tech@xxxxxxxxxxx>
Date: Sat, 12 Jul 2003 12:37:44 -0400
microsoft.xmldom
Exact!!

You are in true!

It's the HTML form (input)
I dont know Why but if I get my string with

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<textarea name="texte" cols="50" rows="10"></textarea>

It' convert to time my string!! One time by the HTML form and second time
with the save XMLDOM method!

So if I use
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<textarea name="texte" cols="50" rows="10"></textarea>

it's work!!!

So now, the fact is for internationnal use, how I can know the local
encoding? I was thinking using charset=UTF-8 is the solution but !!

----- Original Message ----- 
From: "Markus Abt" <abt@xxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Saturday, July 12, 2003 12:26 PM
Subject: AW:  Microsoft.XMLDOM UTF-8 Encoding!


> Hello [Tech],
>
> I guess your problem is: the XML file you are generating is
> correct UTF-8, but it doesn't contain the right characters.
>
> I tried your web example. When I type in one non-ASCII character,
> then save the resulting XML source file, it contains 4 bytes for
> that character (which are displayed as 2 UTF-8 characters in the browser).
>
> Maybe the problem is this line of your code:
>   oEnreg.Text = request.form("texte")
>
> It looks like taking a UTF-8 text, misinterpreting it, and converting it
> later again to UTF-8 during the save.
>
> Your parsing and transforming in ASP seems to contain another bug
> (which Dimitre pointed out) which happens to eleminate the first one.
>
> Bye,
> Markus
> __________________________
> Markus Abt
> Comet Computer GmbH
> http://www.comet.de
>
>
> ----------
> Von: [Tech]
> Gesendet: Samstag, 12. Juli 2003 13:27
> An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: Re:  Microsoft.XMLDOM UTF-8  Encoding!
>
> I repeat,
>
> I dont have problem to parse the XML. All caracters are UTF-8 encoding.
> So response.write(dom.transformNode(xsl)) show the writh thing!
>
> OK, let me show you!
>
> Go here : http://www.trucsweb.com/rss/sauve3.asp
> You can enter all non-us car and it will be UTF-8.
> You see it's work good.
>
> But try open the xml file directly in IE (or Mozilla the same)...
> tx
>
>
> ----- Original Message ----- 
> From: "Julian Reschke" <julian.reschke@xxxxxx>
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Saturday, July 12, 2003 2:57 AM
> Subject: RE:  Microsoft.XMLDOM UTF-8 Encoding!
>
>
> > > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of [Tech]
> > > Sent: Saturday, July 12, 2003 1:03 AM
> > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > Subject: Re:  Microsoft.XMLDOM UTF-8 Encoding!
> > >
> > >
> > > Exact,
> > >
> > > The first byte supose to tell the encoding.
> >
> > The first bytes *may* tell the encoding.
> >
> > > Like this UTF-16 => "Unicode byte-order mark [0xFF 0xFE] or [0xFE
0xFF]"
> > >
> > > But Microsoft (and lot more) say that XML file generate with ASP
> > > and XMLDOM
> > > are UTF-8 by default. (no byte was added to the file...)
> >
> > It doesn't need to.
> >
> > > So, How tell "Microsoft.XMLDOM" to save my XML file with a true UTF-8
> > > encoding?
> >
> > To *save* a DOM in UTF-8, do what you're already doing (create the XML
> > declaration using MSXML's createProcessingInstruction() and save the
> file).
> >
> > However the issue seems to be *serving* XML to a client. You'll need to
> show
> > us *that* ASP code to find the problem. It's almost certainly an
> unnecessary
> > round-trip of the XML serialization trough a string, such as
> >
> > response.write(dom.xml)
> >
> > or
> >
> > response.write(dom1.transformNode(dom2))
> >
> > which *will* break encoding information.
> >
> > Julian
> >
> > --
> > <green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
> >
> >
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> >
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


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


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.