participate


Swing - How to use Japanese characters in java applications
<<   Back to Forum  |   Give us Feedback
This topic has 9 replies on 1 page.
Ramesh_9781
Posts:8
Registered: 8/8/04
How to use Japanese characters in java applications   
Sep 23, 2004 9:05 PM

 
Hello

I'm developing a project for a japanese company in JXTA technology. There i had a problem to display the Japanese characters in JTextField and JTextArea. But i have to bring this in my project. If anybody knows the solution to bring the japanese characters in JTextArea and JTextField Kindly help me.

my personal mail ID : ramesh_9781@yahoo.com
ramesh_sriram@yahoo.com

I'm in a very very critical situation. plz help me

By
Ramesh
 
joop_eggen
Posts:744
Registered: 7/12/01
Re: How to use Japanese characters in java applications   
Sep 24, 2004 12:53 AM (reply 1 of 9)  (In reply to original post )

 
(I am not japanese, so please let someone else shed his/her light on this topic.)
1. There is an Internationalisation forum: http://forum.java.sun.com/forum.jsp?forum=16
2. The japanese locale is even very well supported.
3. In a non-japanese environment you have to take special care:
- In resource bundles everything is UTF-8. A NetBeans IDE or the like, will automatically translate those characters to \u0102 or such.
- You can use the commandline tool native2ascii to convert in any direction: japanese plain text to java UTF-8 (those \u...).
- The font must allow it. Arial Unicode MS or the like.
- You can start java with locale and encoding.

Test it in a JTextPane, where you call setPage(url) with a japanese url or HTML file (call setEditable false first).
 
venkkatesh
Posts:15
Registered: 12/23/01
Re: How to use Japanese characters in java applications   
Feb 18, 2005 4:28 AM (reply 2 of 9)  (In reply to original post )

 
its worth having a click here and see http://www.venkks.net/2005/02/utf8-encoded-data.html
 
luisgar2779
Posts:1
Registered: 9/28/05
Re: How to use Japanese characters in java applications   
Sep 28, 2005 3:29 PM (reply 3 of 9)  (In reply to #2 )

 
im making asoftware for japanese learning, i use php postgressql and java, my program run this way, i keep some words in japanese in postgres and i save the files in utf-8, then i displayit in a php with the java program on it..i installed japanese fonts, i instal the new java jre 1.5.0 , i had do everithing and i still cant display de japanese characters..did anyone know hot to display it on my java program? it would be appreciate!
 
tron2057
Posts:190
Registered: 6/26/01
Re: How to use Japanese characters in java applications   
Sep 30, 2005 2:05 PM (reply 4 of 9)  (In reply to #3 )

 
Hi,

As it was say by my friend above go to http://www.venkks.net/2005/02/utf8-encoded-data.html

James

http://www.x314.co.uk
 
hiwa
Posts:5,008
Registered: 3/29/99
Re: How to use Japanese characters in java applications   
Sep 30, 2005 4:56 PM (reply 5 of 9)  (In reply to original post )

 
Hello

I'm developing a project for a japanese company in
JXTA technology. There i had a problem to display the
Japanese characters in JTextField and JTextArea. But
i have to bring this in my project. If anybody knows
the solution to bring the japanese characters in
JTextArea and JTextField Kindly help me.

my personal mail ID : ramesh_9781@yahoo.com











ramesh_sriram@yahoo.com

I'm in a very very critical situation. plz help me

By
Ramesh

Set up your Japanese customers Java environment and system environment on your machine including system locale, fonts, font.properties, Java system properties including file.encoding, user.language etc.

And of course, you should use native2ascii tool for resource bundles.
 
MichaelB
Posts:7
Registered: 10/27/05
Re: How to use Japanese characters in java applications   
Oct 28, 2005 1:28 AM (reply 6 of 9)  (In reply to original post )

 
Hi I have a similar problem, not sure if you have solved it - have a look at the link thanks..

http://forum.java.sun.com/thread.jspa?forumID=57&threadID=677121.
 
s_krishna27
Posts:1
Registered: 2/15/06
Re: How to use Japanese characters in java applications   
Feb 15, 2006 11:15 PM (reply 7 of 9)  (In reply to #3 )

 
I have stored japanese data in postgres database. I am extracting it using rs.getString() and then displaying it on HTML page by using the encoding = "SJIS" in <XML version.. > tag and charset = UTF-8 in meta tag but still i'm not able to show the information in japanese.
the browser is showing some absurd characters like ?????????.
Pls help me out.
 
Drake_Dun
Posts:551
Registered: 9/9/05
Re: How to use Japanese characters in java applications   
Feb 16, 2006 12:11 AM (reply 8 of 9)  (In reply to #7 )

 
This is not a Java problem. If the machine is set up to work with Japanese, Java will treat it like everything else. If it is not, there is no magical System.pleaseLearnJapanese() method which will solve all your problems. Set the machine up for Japanese.

I work in Japanese in Java all the time on my Windows machine with the Japanese IME installed and this is what I have to do to tailor the Java code to Japanese:

Nothing.

Drake
 
bahstid
Posts:1
Registered: 2/26/06
Re: How to use Japanese characters in java applications   
Feb 26, 2006 5:56 PM (reply 9 of 9)  (In reply to #8 )

 
Been going around in circles with this silly issue for months.... the answer is simple and stupid and is in one of the first posts above:

*********************************************************
*The font must allow it. Arial Unicode MS or the like.*
*********************************************************

and there I was about to resort to VB or something horrid...
 
This topic has 9 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 63
  • Guests : 118

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums