Re: JSP Internationalization
- From: "ck" <chandankumar.r@xxxxxxxxx>
- Date: 7 Mar 2007 15:01:11 -0800
On Mar 8, 2:44 am, dschect...@xxxxxxxxx wrote:
I am trying to setup a test for internationalizing JSP pages in
Japanese. I have some sample strings that I converted in resource
files which I ran through native to ascii.
When I run the pages, I do not see any Japanese characters. On the
screen I only see question marks. I tried hardcoding the unicode
encoded strings. I still get question marks. What am I missing.
The application is running on iplanet app server 6.5 and iplanet web
server 6.0.
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_04-b02)
Java HotSpot(TM) Client VM (build 1.3.1_04-b02, mixed mode)
Thanks for your input.
David
Here is the output
This is a test for Japanese: ??? ? ???
Here is the JSP source.
<%@ page import="java.util.ResourceBundle" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
This is a test for Japanese:
<%
ResourceBundle res = ResourceBundle.getBundle("MyResource");
%>
<%=res.getString("teststring"); %>
<%
tmp="\u6708"; //unicode encoded
%>
<%=tmp%>
<%
tmp="十二月";
%>
<%=tmp%>
</body>
</html>
save the resource file as utf8 format. If you save it as ascii char
set you would get question marks.
--
Ck
http://www.gfour.net
.
- Follow-Ups:
- Re: JSP Internationalization
- From: dschectman
- Re: JSP Internationalization
- References:
- JSP Internationalization
- From: dschectman
- JSP Internationalization
- Prev by Date: Re: Threads
- Next by Date: Re: Hey! i've done a Free Global Bad Words Dictionary,
- Previous by thread: JSP Internationalization
- Next by thread: Re: JSP Internationalization
- Index(es):
Relevant Pages
|