Home
TeamSite
Ansi encoding instead of UTF-8
code
Hi,
I've got a Russian and english page. Pages will be created based on the same presentation template encoded in UTF-8. Both pages do include generated HTML fragments that are encoded in UTF, too.
If I check the output JSP, I receive an UTF-8 encoding for the English pages. However, the Russian pages answers with ANSI. Nonetheless, the referenced HTML fragments do have the correct encoding.
Currently, I don't see any reasons why I got the wrong encoding. Basically, I want everything in UTF-8. I also checked iwpt_encoding. HTML does have the Meta attribute.
Is there anything I might miss? If I change the encoding of the generated page manually to UTF-8, it works ok.
Thanks in advance.
Find more posts tagged with
Comments
Adam Stoller
If the HTML is properly encoded in UTF-8 and the page when rendered through the JSP is not - the problem is most likely with the JSP engine and/or the way the HTML file is being included within the JSP framework.
If you are using JSP 1.1 - and doing dynamic includes - I don't believe it properly handles UTF-8 encoding.
If you use JSP 1.2 *or* use static includes - I believe the UTF-8 encoding will persist.
The above is all based on transient experience and *not* in-depth knowledge of either JSP or UTF-8 - so take with a grain of salt....
--fish
(Interwoven Senior Technical Consultant)
code
Actually, I check the encoding right in the preview window of TeamSite. If I remove some of the Russian text from the page, it will be encoded in UTF-8, otherwise in ANSI. However, I cannot determine a specific character that might not be in the characterset.
Finally, the bea would throw a TokenStreamIOException due to the wrong encoding. Has anybody found a remark on this in the TeamSite documentation. I don't have an idea, why it's switching between different encodings.
Regards