File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Unicode usage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Unicode usage" Watch "Unicode usage" New topic

Unicode usage

yo nara
Ranch Hand

Joined: Apr 03, 2002
Posts: 35
suppose i want to have characters from languages other than english through my java programme.
how do i aceive this using what
import java.util.*;
class Test{
public static void main(String [] a){
char c='\u3059';
instead of printing japanese characters it print ? sign though the os is japnese .what could be the reason
[ April 05, 2002: Message edited by: yogi na ]
Peter Phung
Ranch Hand

Joined: Dec 06, 2001
Posts: 138
You'll have to be more specific with your question if you want answers. Also post aany code that you have so far.

Pete<br />"Reality is an illusion <br />brought on by a lack of <br />drink, drugs and smut"
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Here's what I know about unicode...
Unicode Charts are available from
In Java, to display a particular Unicode character, you can use the unicode escape charater '\u' followed by the code for the character you want to display. Example:
This should ouput a Greed character, but on my system a simple '?' is displayed - probably because my system doesn't know what most Greek characters are.
If you do a search of the API documentation at The NavigationZone for unicode, you'll probably find some useful information.
Sun has a couple of useful articles (found by searching at for unicode). Question of the week - What is Unicode? looks promising.
Finally, the search page of Sun's java tutorials might lead you to some useful information.
Good Luck.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Welcome to the Java Ranch, we hope you’ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!

Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
You need to read up on Internationalization and Localization.

"JavaRanch, where the deer and the Certified play" - David O'Meara
yo nara
Ranch Hand

Joined: Apr 03, 2002
Posts: 35
i want to display japanese characters using java unicode the operating system on pc is japanese
still it do not display japanese characters but prints only ? sign .how do i programme
I agree. Here's the link:
subject: Unicode usage
jQuery in Action, 3rd edition