BreakIterator not working correctly with Chinese text
问题 I used BreakIterator.getWordInstance to split a Chinese text into words. Here is my example import java.text.BreakIterator; import java.util.Locale; public class Sample { public static void main(String[] args) { String stringToExamine = "I like to eat apples. 我喜欢吃苹果。"; //print each word in order BreakIterator boundary = BreakIterator.getWordInstance(new Locale("zh", "CN")); boundary.setText(stringToExamine); printEachForward(boundary, stringToExamine); } public static void printEachForward