File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 173
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: how to read a Chinese character file using Scanner ?