my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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: 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 ?
 
Similar Threads
Using Scanner to read a single character
Reading chinese characters through java input fields
Reading chinese characters through java input fields
Only morons need apply
Internationalization (i18n)