Sorry, there is something going on here that's not evident from your description. Saxon hasn't made up a reference to Cp1252 out of thin air. You must be asking for it somehow; from your description, I can't tell how.
 
Your message seems to be a bit confused about whether you are asking for HTML or XML output. You will never get an XML declaration at the start of HTML output.
 
Michael Kay
-----Original Message-----
From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Fehrenbacher, James (ELS)
Sent: 16 September 2003 20:27
To: 'saxon-help@lists.sourceforge.net'
Subject: [saxon] Saxon message: Failure to load Cp1252

I have  a Java app which transforms XML to HTML on Win 2000 professional. The xml has some unicode chars. used in chemical formulas, etc.
 
With the Xalan transformer, adding the following statement at the beginning of my xsl file
                    <xsl:output encoding="UTF-8" indent="yes" method="xml"/>
and making sure the IE6 has View/Encoding/Auto-select checked so that the browser will pick the UTF-8 encoding
yields HTML which reads as it should - subscripts, daggers, etc correctly placed. The first statement the transformer puts in the
HTML file is
                      <?xml version="1.0" encoding="UTF-8"?>.
 
I recently downloaded Saxon 6.5.3. When I run the app with the Saxon 6.5.3 transformer, the xsl and source as before, I get the message "Failed to load Cp1252." The transformation still works, but the browser displays a lot of junk characters in the formulas now. The HTML is not UTF-8.
 
I noticed the first line of the HTML is now  <?xml version="1.0" encoding="Cp1252"?> yet my xsl is explicitly asking for UTF-8.
Any ideas why Saxon thinks I'm asking for a different encoding than I am?  My xsl:
 
 
 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ce="http://www.elsevier.com/xml/common/dtd" xmlns:drugdata="http://www.elsevier.com/xml/common/drug-database/dtd" xmlns:de="http://www.elsevier.com/xml/common/drug-document/dtd">
 
<xsl:output encoding="UTF-8" indent="yes" method="html"/>
 
<xsl:include href="common-elements.xsl"/>
<xsl:include href="drugdata.xsl"/>
<xsl:include href="monograph.xsl"/>
 
<xsl:template match="drugdata:export-container">
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 </head>
 <body>
 <xsl:apply-templates select="drugdata:database-extract"/>  
 <xsl:apply-templates select="de:monograph"/>  
  </body> </html>
</xsl:template>
 
</xsl:stylesheet>