This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes how to read a Chinese character file using Scanner ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to read a Chinese character file using Scanner ?" Watch "how to read a Chinese character file using Scanner ?" New topic
Author

how to read a Chinese character file using Scanner ?

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
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

Joined: Sep 29, 2000
Posts: 174
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?
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: how to read a Chinese character file using Scanner ?
 
jQuery in Action, 3rd edition