Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
extended characters in presentation templates
Ariane
I'm having trouble with hard-coded extended characters (like é) in presentation templates. The PT is encoded in UTF-8 and is generating a UTF-8 HTML page. The HTML page correctly displays extended characters that are read from DCRs, but incorrectly displays extended characters that are hard-coded into the DCR. The browser says the HTML file is UTF-8. But those extended characters in the PT seem to be converted to ISO (or something) when the page is generated. They display as double-characters. It doesn't seem to matter whether I have the XML declaration with encoding="UTF-8" at the top or not, or whether I issue the iwgen command with the -e encoding. Has anyone encountered this?
Thanks.
Find more posts tagged with
Comments
ela
Hi.
how do you mean the characters are hard-coded into the DCR? Are they read from a flatfile, or just hidden information in the DCT? Take a look at the sourcecode of one of the DCRs, to find the difference between the "hard-coded" characters and the rest.
I'm a bit confused, whether you mean the charcters are hard-coded in the PTs or in the DCR.
Ela
dickens
[I am the original poster of that question -- I was borrowing an account but now I have my own.]
Oops... my mistake -- thanks for pointing that out. What I mean is, they work when they're read from a DCR, but they don't work when they're hard-coded into the presentation template. So if the PT looked like this simple example:
<iw_pt>
<p>Numéro de téléphone : <iw_value name='dcr.phone'/></p>
</iw_pt>
Then any page generated from this PT will have strange characters where the é characters appear. Even though the HTML page is coded in UTF-8, it looks like this:
Numéro de téléphone :
I know that character encoding is a slippery issue, but I am working entirely in UTF-8. Anything read from a DCR or read from a file in perl (with 'open :utf8') produces proper output. It is only the text in the presentation template which is confusing me. Any thoughts?
Thanks.
akshathp
Just to test, can you use a hidden item in your datacapture to pass this as an item and then from presentation template you can use dcr.<fieldname> to invoke this. So really it will be a field that will store the label text.
We would be able to verify if this is a presentation template related issue or not.
Akshat Pramod Sharma
ela
Just some ideas:
Do you also define UTF-8 for the output page in your presentation template: <font color="green"><META content="text/html; charset=UTF-8" http-equiv="Content-Type"></font>?
What character(s) do you see for "é" when looking at the sourcecode for the DCR?
What happens if you instead of é use Ãé or é or é in your PT?
Hans
We have run into exactly this problem. We are also using UTF-8 throughout as we must produce English-French output for all pages.
A simple workaround is to use html entities when needed in the PT.
Migrateduser
Just to be sure...when you hardcoded the character in the PT, did you save the ipl file as UTF8?
--Daniel
rodigz
hi all,
What's the solution for the french and german characters? I'm encountering the same problem.
thanks