Hi, I am new to handling Simplified Chinese text in Struts, JSP, Java web
site. I was able to read from database, and disply Simplified Chinese text
in my JSP pages.
However, when I modified the displayed Chinese text in my JSP and submit it, 
What I got in the Action class was unreadable text, which was saved to the
database.

To determine what the problem was, I added a java line of code to hardcode
the returned text:
String strValue = formBean.getTranslated();
strValue = "some Chinese text";   // override code for testing
preparedStmt.setString(1, strValue);
preparedStmt.execute();

I can now update my database with the hardcoded Chinese text. Hence it is
obvious that the getTranslated() method did not return properly encoded
text.

I had been using the following in my JSP pages
<%...@page contentType="text/html" pageEncoding="UTF-8"%>
...
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
...
<html:textarea property="translated" rows="4" cols="60"/>

I thought I was encoding the page correctly since I can display and enter
Chinese text.  

Any idea?
-- 
View this message in context: 
http://www.nabble.com/How-do-I-submit-Simplified-Chinese-text-to-my-Action-Class--tp21189721p21189721.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to