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(_at_)comcast(_dot_)net 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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--