-
1. Re: Don't support Chinese characters ?
monkeyden Oct 31, 2006 11:23 AM (in response to eddielee)Have you read the chapter of the tutorial on i18n?
http://docs.jboss.com/seam/1.0.0.GA/reference/en/html/i18n.html -
2. Re: Don't support Chinese characters ?
jazir1979 Oct 31, 2006 6:12 PM (in response to eddielee)Hi Eddie,
I am using chinese characters in Seam with no problems.
I have a messages_zh.properties with entries like:
Copyright=2006 \u8457\u4F5C
And I'm using this on my home page to allow the user to switch from their default locale (as sent by the browser):
<h:selectOneMenu value="#{localeSelector.localeString}">
<f:selectItems value="#{localeSelector.supportedLocales}"/>
</h:selectOneMenu>
<h:commandButton action="#{localeSelector.select}" value="#{messages.home_ChangeLanguage}"/>
And the locale support in my faces-config.xml:
<locale-config>
<default-locale>en-AU</default-locale>
<supported-locale>zh-CN</supported-locale>
</locale-config>
It works very well.
good luck,
Daniel. -
3. Re: Don't support Chinese characters ?
eddielee Oct 31, 2006 8:31 PM (in response to eddielee)I'm not display Chinese characters .
it's reuqest form by <h:inputText ..../>.
if I typed Chinese characters ?? ? but request value is :& # 26631;& # 39064;
the demo of Hotel ?is also too.
please see the screen
http://www.vsoftware.com.cn/jt.jpg -
4. Re: Don't support Chinese characters ?
eddielee Oct 31, 2006 10:46 PM (in response to eddielee)hi all.
the problem is none by myself.
add a filter in web.xml?
public void doFilter ( ServletRequest arg0 , ServletResponse arg1 ,
FilterChain arg2 ) throws IOException , ServletException
{
arg0.setCharacterEncoding("utf-8");
arg2.doFilter ( arg0 , arg1 );
}