[xsl] character encodings

Subject: [xsl] character encodings
From: Pam Huntley <phuntley@xxxxxxxxxx>
Date: Thu, 21 Nov 2002 16:46:09 -0500



Hi,

So, I read through the FAQ, and I'm still a bit confused about character
encodings.   I'm having a problem where my XML file is in utf-8 (and has
english characters in it), but my XSL file has DBCS characters in it, and
although I saved it as UTF-8, I don't really know what the encoding is (I
think for japanese it's ms_kanji, big5 for chinese).  When I go to
transform using the microsoft msxml stuff, I get an error saying the XSL
does not contain a document element.  However, if I use the exact same XSL,
only the untranslated version (or any single byte version), saved as utf-8,
it works.

I got the strings translated, and they came back in an ANSI file.  I
couldn't send the XSL off to be translated because our translation centers
don't really know what to do with it.  Then I used a program to go replace
the strings back where they belong in the XSL.  So, for single byte
languages, I save the resultant XSL in utf-8 and everyone is happy.   But
for the DBCS languages, even if I save the resulting file in utf-8, I get
the error.

I don't have any control over the XML file - it comes from a server, and I
just save it to a file.  Is there some way to make the XSL work, even if it
is not utf-8?

I'm really new to XSL/XML programming, and I didn't see any way to specify
the document encoding for the xsl...  any help would really be appreciated.

Thanks!

Pam


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


Current Thread