cancel
Showing results for 
Search instead for 
Did you mean: 

Special chars not displaying properly in preview

rmills
Champ in-the-making
Champ in-the-making
When creating or editing a piece of xml content in a web form, I'm able to create special characters (specifically M-dashes), that display correctly in the web form.  The web form creates an HTML rendition of the content.  When opening either the XML or HTML piece of content (clicking on their names), the special characters are displayed correctly.  However, when trying to view the HTML rendition through the preview instance, the characters are displayed incorrectly (i.e. — for an M-dash). 

Upon further examination, the page info for the HTML when opened by clicking on the file name is stated as being rendered as a UTF-8 document.  But the page info for the same HTML content being viewed through the preview instance is being rendered as ASCII ISO-8859-1.  I suspect this translation is causing the issue.  

I've tried editing the HTML behind the content in the webform (I enabled the HTML editor in TinyMCE) and replacing my special characters with their Unicode and ASCII codes (i.e. — or — or — for an M-dash) to no avail.  I had the same outcome.  The special characters displayed correctly in the web form and when opening the document (clicking its name) but NOT when previewing the document. 

Is there some way I can configure the preview instance to render content in UTF-8?  Is there another work around?
6 REPLIES 6

pmonks
Star Contributor
Star Contributor
That sounds like a bug to me.  Have you raised it with support or in JIRA?

Cheers,
Peter

rmills
Champ in-the-making
Champ in-the-making
No, I hadn't yet.  I had thought it was a configuration thing (one tomcat configured for UTF-8 and one for 8859) but after investigation and not having gotten very far, I think it might be.  I'm opening a ticket now.  Thanks Peter.

pmonks
Star Contributor
Star Contributor
Yeah I took a look at the config for the Virtualisation Server and couldn't find anything obvious that would indicate it's erroneously forcing requests to be encoded in 8859.  That said I haven't had time to try reproducing the issue either, so it could be environmental or configuration related.

Would you be able to post an example XML file here that demonstrates the problem?  Not sure if the forum s/w will munge the file, but if not it'd speed up my ability to test it.

Cheers,
Peter

anik
Champ in-the-making
Champ in-the-making
Hey Is this issue resolved?

If yes please let me know the details :roll:

anik
Champ in-the-making
Champ in-the-making
The problem is with  .ftl rendering template. if you use XSL for rendering template then all special charater will get properly displayed. Smiley Happy
But yes with .ftl rendering template i dont know how to solve this.

Try XSL as my problem is resolved. Smiley Very Happy  Smiley Tongue

anik
Champ in-the-making
Champ in-the-making
hi,
in XSL you can resolve this issue using disable-output-escaping="true" as an attribute.
in FTL also you need to include one markup… which will resolve this issue.. i will update the code if you need

Thanks
anik