You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bryan Dickey <bD...@youngliving.com> on 2005/06/08 19:23:10 UTC

Submitting Japanese characters in MyFaces??

I hope I'm just missing something here.  I'm not able to submit Japanese
text and store the value in a managed bean with MyFaces. 

I'm using a simple encoding filter for all my pages to set charset to
UTF-8.  I then load the following jsp:

<%@ page language="java" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<html>
	<f:view>
		<head>
			<title>test</title>
			<meta http-equiv="pragma" content="no-cache">
			<meta http-equiv="cache-control"
content="no-cache">
		</head>
		<body>
			<h:form>
				<h:inputText
value="#{member.custName}"/><br/>
				<h:commandButton action="null"
value="Click me!"/><br/>
				<h:outputText
value="#{member.custName}"/>
			</h:form>
		</body>
	</f:view>
</html>

The page correctly appears in UTF-8 encoding (before and after submit),
but submitting Japanese text results in gibberish being sent to the
setter in my session-scoped bean.  When I load the same page in a
different app that uses the Reference Implementation, the Japanese is
submitted and returned correctly (as numeric character refs).  This is a
showstopper for us... Is there anything I can do to enable the
submission of Japanese characters?

Thanks,
Bryan