Re: JSP Internationalization



On Mar 7, 6:01 pm, "ck" <chandankuma...@xxxxxxxxx> wrote:
On Mar 8, 2:44 am, dschect...@xxxxxxxxx wrote:





I am trying to setup a test for internationalizingJSPpages 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 theJSPsource.
<%@ 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.

--
Ckhttp://www.gfour.net- Hide quoted text -

- Show quoted text -

The native resource file is saved as UTF 8. When I run native2ascii I
specify utf-8 encodiing. The ASCII equivaluents whether from the
compiled resource file or pasted into the JSP appear as question
marks.

David

.



Relevant Pages

  • Re: Quote marks and Question marks
    ... any quotation marks show up at the ... the messages comes back to me with question marks instead of quotation ... or characters of text in a word processing program. ... so ASCII only uses 7 bits. ...
    (comp.sys.mac.system)
  • Re: Can I upload Perl program in unicode?
    ... That's just two question marks, chr 63, right? ... "Save as UTF8" sounds like something a word processor would do. ... to be in ASCII to be run ...
    (comp.lang.perl.misc)
  • Re: Coverting ASCII characters to Binary or another format?
    ... The problem is that not all the ascii values will print ... for example you get question marks for unviewable ascii ... A simple way to convert ASCII to bytes is to call the String method ... String originalText = new String; ...
    (comp.lang.java.help)
  • Re: question marks appearing in email
    ... me asking why there are question marks all over the place. ... that somehow where I have typed single or double curly quotes, ... The email system was designed only to send 7-bit ASCII text; ... (this includes curly quotes and foreign language/accented characters) ...
    (comp.sys.mac.apps)
  • Re: HLAs
    ... >Good resource. ... It is not in ASCII. ... BCET Basic Compiler Page: http://www.arargh.com/basic/index.html ...
    (comp.lang.asm.x86)