• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Unicode usage

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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';
System.setProperty("file.encoding","MS932");
System.setProperty("user.language","ja");
System.setProperty("sun.io.unicode.encoding","UnicodeLittle");
}
System.out.println(c);
}
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 ]
 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll have to be more specific with your question if you want answers. Also post aany code that you have so far.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's what I know about unicode...
Unicode Charts are available from Unicode.org.
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:
System.out.println("\u03EA");
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 java.sun.com 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.
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yogeshnaravane
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!!
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to read up on Internationalization and Localization.
 
yo nara
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Everybody! Do the Funky Monkey! Like this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic