wood burning stoves*
The moose likes JSP and the fly likes Problem in displaying Japanese Characters on Web Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem in displaying Japanese Characters on Web" Watch "Problem in displaying Japanese Characters on Web" New topic
Author

Problem in displaying Japanese Characters on Web

Conan King
Greenhorn

Joined: Aug 31, 2003
Posts: 23
Hi Friends,

Hope one of you could help me in this!!

We are using SHIFT_JIS character encoding in our jsps to display Japanese characters.

<%@ page contentType="text/html; charset=SHIFT_JIS" %>

Is there any other configuration required on server side to let the Japanese characters being displayed? Because what I am getting on screen is quite annoying. Well something like below.

?V?M???�

Even though my knowledge in Japs isn't too good :-)) I can understand that these are not Japanese. I believe I am missing something in terms of server side configuration, Can anybody point that out. (Maybe some of the Japanese developers in here).

This could not be a client side issue, since from the same machine I can access other Japanese sites and they display properly. Let me know if anybody can help.

Thanks,
Conan


King<br /> <br />SCJP 1.4, SCWCD 1.4
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
maybe something like this would help:

<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">


Eric
Conan King
Greenhorn

Joined: Aug 31, 2003
Posts: 23
Thanks for the reply Eric.

Tried with your meta tag, It did change the characters, but they are not Japanese yet. Initially I was getting ??? on the screen, Now there were some different characters, but not quite Japanese. However after trying with some other combinations, I used pageEncoding to get the Japanese characters properly printed.

This was what I used finally

<%@ page
contentType="text/html; charset=SHIFT_JIS "
pageEncoding="SHIFT_JIS"
%>

And the Japanese texts got printed properly on the browser.
属性をすべて表示します

However the worries are not completely gone. Now there is a warning message in the Websphere log (I am running these in WAS 5.0)

Error in Log

TraceNLS u No message text associated with key Failed.to.create.a.writer.with.encoding:.{0}..The.default.encoding.will.be.used. in bundle com.ibm.ejs.resources.seriousMessages
SRTServletRes W Failed to create a writer with encoding: SHIFT_JIS . The default encoding will be used.

Well any idea on what is this is now?? I would appreciate suggestion from anybody having some idea of this problem.
Ja vardhan
Ranch Hand

Joined: May 09, 2005
Posts: 169
Hi Friends,

I am also working on this type of application and suffering with proble: not able to display Japanese characters on UI, Here am entering the Japanese string in one page and trying todisplayon other page(just to check); its not working, they r getting displayed like �����‚wr��†��Ÿ, i understood its not japanese. Actually i have to cappture the user entered japanese character, store it into Oracle DB and and fetch n display that string whenever necessary.

To display on UI i tried out the solutions u guys specified above, but am not able to get it.
Pls. tell me in detail what r the various things i need to do for displaying on UI and storing in DB.

Thnx.


Javardhan:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in displaying Japanese Characters on Web