It's Windows XP.
I have put encoding setting (for response) in all JSP pages:
<%@ page pageEncoding="UTF-8" %>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
That made all russian text show correctly in the GUI.
However, when I try to get that attribute from Managed Bean, it returns "?????"
I tried to set request encoding setting in MB constructor, but that didn't
help.
HttpServletRequest req =
(HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
req.setCharacterEncoding("UTF-8");
Someone suggested to do that call in the Filter, but I am not sure how/where I
do that.
My app doesn't have server.xml. And it is deployed on WL domain, not inside
the server.
I would try to avoid changing server setting, our support would hate that.
Thank you,
Oleg.
________________________________
From: Mike Quentel [mailto:[email protected]]
Sent: Tuesday, June 02, 2009 2:57 PM
To: 'MyFaces Discussion'
Subject: RE: MyFaces i18n with Russian problems
Given the OS and web container, the encoding settings for both will need to be
set to support Cyrillic character sets; also, if necessary, install character
sets (for the OS) for the language in question.
For example, in Tomcat, server.xml, Connector tag needs URIEncoding set to
UTF-8:
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="600" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="10000" disableUploadTimeout="true"
URIEncoding="UTF-8" />
Oddly, JAVA_OPTS might need -Dfile.encoding=ISO-8859-1
rather than UTF-8.
For logging, use UTF-8 encoding.
log4j.appender.MyAppender.Encoding=UTF-8
What OS is this running on?
Mike Quentel
From: K, Oleg
Sent: 2 June 2009 13:27
To: 'MyFaces Discussion'
Subject: RE: MyFaces i18n with Russian problems
Weblogic 9.2 Express.
________________________________
From: A G
Sent: Tuesday, June 02, 2009 12:04 PM
To: MyFaces Discussion
Subject: Re: MyFaces i18n with Russian problems
Hi Oleg,
please provide the name/version of webcontainer which you use.
2009/5/27 K, Oleg
Hi,
I am new to JSF, trying to build prototype i18n JSF app with MyFaces 1.1.5
Mostly care about IE6/7, do not officially support other browsers.
I do have resource bundles, it is localized and internationalized.
So user is supposed to work in either English or Russian (and Spanish).
It all works except few issues:
1) When user enters something in Russian in inputText field on the first page,
trying to pass it to the next page via managed bean.
But instead of showing it in Russian, it shows some garbled text in outputText
or outputLabel: Îëåã
FF3 & Chrome show it as: Олег [&#xxxx, where xxxx us a
4 digits]
It does pick up labels from correct bundle on the next page, so locale is
changed correctly.
Actually, when I switch locale on the same first page, getting the same problem
(after it's refreshed).
Seems to work OK with Spanish.
Is that incorrect Cyrillic encoding, JSF encoding or broken Unicode or locale?
How can we fix that ?
Less important issues:
2) When we switch locale (correct values in bundles), on the screen it can not
change currencyCode, currencySymbol, TimeZone,
it always shows the first one it picked, although dateTime and Number
formatting changes correctly;
3) In IE6 "alt" tag attribute produces garbled characters in Russian (black
vertical squares), looks like IE6 bug; FF3 & Chrome work fine.
Please help !
TIA,
Oleg.