Name: el35337 Date: 01/17/97
The following code must prints "1\u884c\n". But it prints "1\n\u884c\n".
The sequence of digit character before cjk character is split in JDK1.1Beta2,
but it must not be split.
--------------------------------
import java.text.*;
import java.util.*;
class BTest {
public static void main(String args[]) {
String stringToExamine = "1\u884c";
TextBoundary boundary = TextBoundary.getSentenceBreak();
boundary.setText(stringToExamine);
printEachForward(boundary);
}
public static void printEachForward(TextBoundary boundary) {
int start = boundary.first();
for (int end = boundary.next();
end != TextBoundary.DONE;
start = end, end = boundary.next()) {
System.out.println(boundary.getText().substring(start, end));
}
}
}
--------------------------------
(OS is win95 Japanese) ###@###.###
======================================================================
- duplicates
-
JDK-4068133 Line breaking doesn't handle CJK punctuation correctly
-
- Closed
-