[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] msxml apostrophe encoding


Subject: Re: [xsl] msxml apostrophe encoding
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Tue, 11 Jan 2005 15:33:41 +0100

Hi Carter,

In addition to "please ensure you are using UTF-8 or something when trying the above", have you specified an encoding for the HTML page which contains the javascript? You might have to specify utf-8 (or ansi?) in all related documents to get it working...

Cheers,
Geert

Emmanouil Batsis wrote:

fchoodless@xxxxxxxxxxx wrote:

Hi,
I can't seem to get certain type of apostrophe () to show up correctly when transforming client side with Javascript and using transformNodeToObject. It's a curly apostrophe which is typically cut and paste from word, etc. The end of the code I'm using to transform is here, it's being inserted into the middle of an html page. xml.transformNodeToObject(xsl, resultdoc); document.write(xml.transformNode(xsl));



First of all you may want to avoid document.write. Also, why are you transforming twice? I believe you need to


someElement.innerHTML = xml.transformNode(xsl);

or

xml.transformNodeToObject(xsl, resultdoc);
someElement.innerHTML = resultdoc.xml;

using the DOM to append the result instead of innerHTML would be a lot better.

As for the apostrophe, just save as HTML from word to tell us how Word outputs that. Once the character is identified, i'm sure someone will figure oout the right entity to use. However i dont think you will need to, the problem probably has to do with document.write (but please ensure you are using UTF-8 or something when trying the above).

hth,

Manos


Current Thread