Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set the different locales in jvm

 
upanshu vaid
Ranch Hand
Posts: 83
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
when running this below I am not able to get the Date printed in Chinese Language as the JVM installed on my system is supporting my locale how to set the JVM so that many different locales can be set
 
Ivan Jozsef Balazs
Rancher
Posts: 979
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is "System.out.println" capable of printing Chinese characters on your system in the first place?

Mine is admittedly not.

zh_CN
Fri Aug 16 16:21:22 CEST 2013
2013?8?16? ???
fr_FR
Fri Aug 16 16:21:23 CEST 2013
vendredi 16 ao?t 2013
hu_HU
Fri Aug 16 16:21:23 CEST 2013
2013. augusztus 16.

 
upanshu vaid
Ranch Hand
Posts: 83
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On mine system I am able to print in my locale only,I have read that there is an environment .bat file which needs to be configured but I am not able to find that file any help on this would be appreciated
 
Ivan Jozsef Balazs
Rancher
Posts: 979
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe the locale stuff works as it should and the problem is simply with System.out.println.

You could write the stuff into a file (with the encoding utf-8) and view it wul some capable editor in order to check.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic