Re: JSP Internationalization



I had a similar problem with Greek characters. The only thing that
fixed it for me was to make sure that my Oracle database was in the
correct character set, Oracle 9i did not use the standard UTF-8 unless
you set up the whole database at creation time with one obscure
character set.

Also had to put this in all my pages.
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Absolutely all of them including in all the included JSP files. That
fixed it for me. In my experience it is normally the database that is
causing the problem.

Sorry if you know this already, best of luck
cheers
Martin

On Mar 8, 4:10 pm, dschect...@xxxxxxxxx wrote:
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: Loading a data file containing character fields with different encodings
    ... UTF-8 characters along with Latin-1 characters. ... One containing the latin-1 character set column, the second containing the utf-8 column and of course both files containing the primary key information. ... it would be just as easy to write the loader script that converts the encoding to a "unicode" intermediate format and then load with the correct database encoding. ... This caused that no conversion was done, but you were puting CP1252 characters into an 819 database! ...
    (comp.databases.informix)
  • Re: Are there performancebenefits to reorganizing database-using export/import?
    ... time we had done full export of 8.1.7 database and then created 9.2. ... those warnings are well defined in "Expert Oracle Database ... What happens if you accidentally change the character set when you ... exactly 30 characters long with an empty set character in the column ...
    (comp.databases.oracle.server)
  • Re: help needed
    ... Whether you use pointer arithmetic or array notation, set up the database to look like a two-dimensional array of chars; ... Get the first character of the database entry. ... Of it is NULL go on to the next database entry. ... a NULL password will pass unless all database entries contain valid passwords. ...
    (comp.dsp)
  • Re: Syntax Problem
    ... If we can identify the specific character that is the delimiter for the ... Can you copy and paste the special delimiter character into a newsgroup post ... >> Oae is the extension requested by the College Board of Examiners in New ... >>> The Database Name argument is the database you are exporting to. ...
    (microsoft.public.access.macros)
  • Re: Regular expression for check that an entered filename is valid
    ... is valid in a file name -- asterisks, question marks, colons, tabs, line ... character itself, less-than and greater-than signs, double quotes and the ...
    (comp.lang.php)