RE: [xsl] Encoding iso-8859-1 always return UTF-16

Subject: RE: [xsl] Encoding iso-8859-1 always return UTF-16
From: "Ruairi" <ruairi@xxxxxxxxxxxx>
Date: Fri, 6 Jul 2001 19:36:34 +0200
Microsoft recommend theat you put the following in you .ASP or .PASP before
any output.

   <% Response.ContentType = "text/xml" %>
   <?xml version="1.0" encoding="iso-8859-1" ?>

And in the XSL:
   <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>

Microsft explain:(babble)
Serving Out XML Files from an HTTP Server
XML documents can be delivered through a standard HTTP server by registering
the "text/xml" Multipurpose Internet Mail Extension (MIME) type on the
server. Installing Microsoft® Internet Explorer 5.0 on the server registers
the XML MIME type and associates it with the .xml and .xsl file extensions.
This association is used by Microsoft Internet Information Services (IIS)
and the Microsoft Personal Web Server (PWS) to determine the MIME type.

When using either of these servers on systems that do not have Internet
Explorer 5.0 installed, the XML MIME type can be registered by running the
register-xml.regregister-xml.reg file, which inserts the appropriate keys
into the registry. The changes will not take effect until the computer has
been restarted.

Alternatively, for IIS on systems that do not have Internet Explorer 5.0
installed, the XML MIME type can be registered using the Internet Service
Manager console. Select Default Web Site and open the Properties dialog box.
Select the HTTP Headers tab, click the File Types tab, select New Type, type
.xml for the extension and text/xml for the Content Type, and then click OK.
The .xsl extension can be registered in a similar fashion.

The .xml and .xsl extensions can also be registered to the XML MIME type
manually from the File Types dialog box under Folder Options. Extensions
indicating other types of XML files for purposes of browsing must be
manually registered as MIME type "text/xml".

Declaring the XML MIME Type in an Active Server Page
When generating XML dynamically using Active Server Pages (ASP), the content
type must be declared in the .ASP file itself. The ContentType property of
the Response object indicates that the result is XML. Include this line in
Active Server Pages that are delivering XML.

<% Response.ContentType = "text/xml" %>
Important   If the XML MIME type is not registered on the server, the MIME
type sent to Internet Explorer in the HTTP header will be incorrect?often
"text/plain". Although Internet Explorer 5.0 often can detect and process
these documents, conflicts can arise between the various detection
algorithms. For example, part of Channel Definition Format (CDF) file
detection involves looking for <CHANNEL> tags?an XML document delivered with
an incorrect MIME type and that uses elements named "CHANNEL" could
mistakenly be handed off to the CDF processor instead of displayed as an XML
document. Avoid these tricky and hard-to-debug problems by making sure your
server correctly sends the XML MIME type.
Internet Explorer 5.0 also recognizes documents of MIME type
"application/xml" as XML; see Internet Engineering Task Force Request for
Comments 2376, XML Media Types (IETF RFC2376) (external link).



Regards,
-Ruairi

____________________________________________________________
Ruairi O'Donnell
Rutland Systems                             www.rutlands.com
Alcalde Lorenzo 16 2A                     Tel +34 981 884108
15220 Bertamirans, Ames                   Fax +34 981 884108
Spain                                  Mobile +44 7801141801
____________________________________________________________

The contents of this message should be read in conjunction
with the document found at:
http://www.rutlands.com/signature.htm

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Arthur Costa
Lima
Sent: 06 July 2001 15:24
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Encoding iso-8859-1 always return UTF-16


Thanks all

I did solve that problem using encoding=windows-1252 in xsl and xml config
file.

The iso-8859-1 encoding was not working correctly.



Arthur
CPM-Brazil

-----Original Message-----
From: Arthur Costa Lima [mailto:arthur.lima@xxxxxxxxxx]
Sent: Wednesday, July 04, 2001 6:51 AM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Encoding iso-8859-1 always return UTF-16



I'm using MSXML 3.0 and XSLISAPI 2.1 Filter on iis.

I have a .pasp file to generate the xml and I'm using xls to convert to
html. The PI instruction on xsl is

<?xml version="1.0" encoding="iso-8859-1"?>

but always the output in html is

<META http-equiv="Content-Type" content="text/html; charset=UTF-16">

how do i solve this problem?

Tanks
Arthur Costa Lima
CPM - Brazil





 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