xsl-list
[Top] [All Lists]

Re: Microsoft.XMLDOM UTF-8 Encoding!

2003-07-11 15:29:46
I am going way out here, so please swat me down if I am wrong. If I
remember correctly the first byte of a file will tell if it is (really)
utf-8 or iso-8859-1 encoded. You can say its utf-8 in the declaration,
but if the file is saved with an editor that is only capable of saving
in iso-8859-1 format, the first byte of the file will say so (something
about bit order I believe). What you could be running into is a file
that truly is iso-8859-1 (or utf-16 etc) encoded saying its utf-8 - and
whatever process you are using to read the xml file doesn't buy what you
are saying.

Again, sometimes I confuse my dreams with stuff I actually read so that
may not be true :).

Try setting the xml file to iso-8859-1 or UTF-16 and see what happens

Cheers,
Rob

On Fri, 2003-07-11 at 14:22, [Tech] wrote:
Hi,

I create a valid UTF-8 encoding XML file with "Microsoft.XMLDOM".
It's OK when a parse my XML/XSL with ASP.

But not if I open the file directly with Mozilla or IE

1. My XML file are OK
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="sauve.xsl"?>

2. My XSL file
<?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" indent="no"/>

3. And I force the "Content-Type"!
<xsl:template match="/">
   ...
=>>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  ...

Mozilla say (File info tab) that is "ISO" file but say about "Content-Type"
== >text/html; charset=UTF-8

Gorgeous!

Tx


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


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