mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8228352: CANON_EQ breaks when pattern contains supplementary codepoint
Reviewed-by: naoto
This commit is contained in:
parent
465eff703f
commit
66dc6cf25b
2 changed files with 13 additions and 2 deletions
|
@ -1506,7 +1506,7 @@ public final class Pattern
|
|||
String seq = src.substring(off, j);
|
||||
String nfd = Normalizer.normalize(seq, Normalizer.Form.NFD);
|
||||
off = j;
|
||||
if (nfd.length() > 1) {
|
||||
if (nfd.codePointCount(0, nfd.length()) > 1) {
|
||||
ch0 = nfd.codePointAt(0);
|
||||
ch1 = nfd.codePointAt(Character.charCount(ch0));
|
||||
if (Character.getType(ch1) == Character.NON_SPACING_MARK) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue