on 11-02-2005 9:19 AM
Hi, All,
Our web application running on Web AS 6.40 with SQL Server 2000 needs to support multiple languages. We create the tables with column type NVARCHAR, set encoding scheme to UTF-8 for JDBC driver, add '<%@ page language="java" contentType="text/html;charset=UTF-8" %>' header in every JSP file and execute request.setCharacterEncoding("UTF-8") before every request is posted to the server. Everything is fine when running the same application on Tomcat with the same database & JDBC driver, enter Chinese charater in web page, store them in table, display result back... But the application deployed in Web AS Java cannot save and show Chinese character correctly.
I think I must miss some points here because UME actually supports to create user and role in Chinese...
Any help is deeply appreciated.
John
I found what causes the problem.
I use resource bundle to handle i18n and one of bundle is myapp_zh.properties for Chinese locale. In browser I add Chinese [zh] in Language Preference then the web page should display Chinese character.
What puzzles me is that encoding of the page with Chinese characters is Chinese Simplified (GB2312) rather than UTF-8. Tomcat correctly sets page Encoding to UTF-8 since I specify <%@ page language="java" contentType="text/html;charset=UTF-8" %> in each JSP file. Why Web AS ignores this and returns Chinese character in GB2312?
Thanks a lot
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.