Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling Japanes Fonts  RSS feed

 
Ketul Parikh
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have implemented Unicode in Jsp's in the following way :-

<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>

When I input a string in gujarati, i.e. ઉપલબ્ધ in a form field and access it in servlet using req.getParameter there is no problem.

The problem is when i do the same thing with 愛知県新城市の req.getParameter gets ???

 
Devaka Cooray
Marshal
Posts: 5326
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Ketul


Ketul Parikh wrote:Does any body know why is it so?

Were you really expecting an answer within 3 hours? Please EaseUp


Ketul Parikh wrote:The problem is when i do the same thing with 愛知県新城市の req.getParameter gets ???

How did you check this output?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the machine on which you're viewing this have a font installed that includes those characters?
 
Ketul Parikh
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly I was not expecting reply in 3 hours, just that i thought my question format was improper...

Anyways, getting back to the point, I checked the output while debugging in eclipse IDE,
As it was showing for gujarati, i think it should be showing for japanese as well..

Also I do not have japanese font installed on my local machine..

Is it necessary?? I dont think so...
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you expect Japanese characters to be displayed if you don't have a font installed that includes those characters?
 
Ketul Parikh
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont even have gujarati fonts installed on my pc..
How are they visible then....
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont even have gujarati fonts installed on my pc.

Apparently you do. You needn't have installed those yourself; they could have been there from the beginning, or been installed by some piece of software. Assuming that you're using Windows, find on MS Office CD - it contains an option to install Unicode fonts that contain just about every character you could wish for, including Japanese ones.
 
Ketul Parikh
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh ya, thanks for that peice of info....

I found out on the following link and installed the japanese fonts support.....

http://www.coscom.co.jp/japanesefont/japanesefont/nonunicode.html

I have given the link so you could just verify if i have done the right thing, because my problem still persists.

I also read somewhere that on the local machine @ JRE HOME/lib/fonts the fonts that are given does not include Japanese, Chinese and Korean fonts.

I wonder if its true !!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!