[xsl] MSXML / NBSP problem and resolution

Subject: [xsl] MSXML / NBSP problem and resolution
From: "Michael H. Semcheski" <mhs-list@xxxxxxxxx>
Date: Wed, 06 Nov 2002 11:19:59 -0500
After a few hours of testing and looking through the archives, I figured out a solution I had not seen presented on this list. I hope no one else is having the same problems, but I am posting this because I am sure that someone will.

I was working with active server pages (asp) and MSXML 3.0 to generate a page by transforming an XML document via an XSL stylesheet. Nothing out of the ordinary.

The problem I was having was that no matter what character set I defined in the XSL document, there was a meta-tag being added that set the character set to UTF/16 ala:
content="text/html; charset=UTF-16"


This leads to Internet Explorer selecting Unicode as the encoding type when set to the default "Auto-Select" encoding. I added the following at the top of the script:
Response.CharSet = "ISO8859-1"
The meta tag still comes through as charset=UTF-16, but the Auto-Select function selects Western (ISO), and instead of nbsps showing up as ? they display correctly.


Any comments? I would like to hear any comments on the merits of this solution.
Mike



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



Current Thread