Re: JSP Internationalization



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

.



Relevant Pages

  • Re: Japanese characters in CEdit and CComboBox
    ... Shell Dlg font if you want to be safe. ... I find that to be much quicker than using the resource editor. ... You will also want to run the actual dialogs on a machine with Japanese ... "Michael Reim" ...
    (microsoft.public.vc.mfc)
  • japanese language not working in cloned component
    ... Working on a cloned version of calibrui I have a strange behaviour. ... with resource editor in PB. ... Added the language information for japanese to calibrui_clone.rc: ...
    (microsoft.public.windowsce.platbuilder)
  • RE: Installation problem with multi-language
    ... Looks like embedded foreign language resources ... There is a "ja-JP" folder in the bin ... Thread from default to Japanese, ... The resource files are all distributed as 'embedded resource' ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Japanese characters in CEdit and CComboBox
    ... Japanese resource dll with VS .NET 2003, result is the same, some CEdit ... "Michael Reim" wrote: ... japanese characters. ... After debugging I narrowed it down to a problem with resource files. ...
    (microsoft.public.vc.mfc)
  • Re: Japanese and Chinese RC files in Embedded Visual C++ 4
    ... Try posting to Pocket PC newsgroups. ... > I have been trying to have my resource files translated to Japanese and Chinese on PocketPC. ... Shift-JIS for Japanese, and I paste it into the String Table editor. ... > I build it as resource only dll. ...
    (microsoft.public.windowsxp.embedded)