java scanner chinese character

I just find it is difficult to scan Chinese character in Java.
For reading UTF-8 chinese character by Scanner, you need to identify the char-set.

1
Scanner sc = new Scanner(file, "utf-8");

Or sc,hasNext() will end inaccidently.


java scanner chinese character
https://rug.al/2014/2014-12-05-java-scanner-chinese-character/
Author
Rugal Bernstein
Posted on
December 5, 2014
Licensed under