Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Chinese character input

843836Dec 2 2004 — edited Dec 6 2004
To anyone who may help:
I am currently working on a JSP page that allows user to key in chinese character in a text field.
The page is formed from several JSP pages, as follow:
chinese_character.jsp <include> header.jsp
<include> menu.jsp
<include> input.jsp
<include> tab.jsp
<include> footer.jsp

Basically, the chinese character can be inserted in text fields in input.jsp and chinese_character.jsp (in which both having the same form).
I have tried specifying the following in header.jsp
<%@ page language = "java" contentType="text/html; charset=gb2312"%> and
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
while the following in input.jsp and chinese_character.jsp
<%@ page language = "java" contentType="text/html; charset=gb2312"%>
When the page is loaded, the text field is empty and I enter some chinese characters in input.jsp and save it to database. The data in database shows the exact chinese characters I have entered but when the page reloads, the data appears as ??. I checked the encoding and it has been changed to Chinese Simplified (GB2312).
I'm using Eclipse to develop the application running on Jrun 4. I use Windows XP's Chinese input (Chinese (PRC)) to enter the value.
I have also tried to enter chinese character as label. It appears as chinese character in Eclipse, but ?? when the page is loaded. When I close the JSP file in Eclipse and reopen it, it appears as ??.
Please advise on how I can solve this issue. Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 3 2005
Added on Dec 2 2004
4 comments
207 views