mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8216332: Grapheme regex does not work with emoji sequences
Reviewed-by: rriggs
This commit is contained in:
parent
add18914fb
commit
eeaafbe141
3 changed files with 78 additions and 39 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -71,7 +71,7 @@ final class Grapheme {
|
|||
int t1 = getGraphemeType(ch1);
|
||||
|
||||
if (gb11 && t0 == ZWJ && t1 == EXTENDED_PICTOGRAPHIC) {
|
||||
gb11 = false;
|
||||
// continue for gb11
|
||||
} else if (riCount % 2 == 1 && t0 == RI && t1 == RI) {
|
||||
// continue for gb12
|
||||
} else if (rules[t0][t1]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue