Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to read a Chinese character file using Scanner ?

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to read a Chinese character file using Scanner ?

I am using


I have tried lots of way, it still can't display correct character.

Any way out ?

Thanks.
 
Terry McKee
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Edward,
The Scanner class is used for parsing of String data using regular expressions. The locale can affect how characters are interpreted in relationship to regular expressions that you may use with the scanner.

The Scanner class doesn't have anything to do with displaying of characters. I suspect that you are using additional code such as System.out.println() statements. Depending on the environment that you are working on it may or may not have support for displaying of Chinese characters.

Could you provide more details on what you are trying to accomplish?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic