Check words for single script

This commit is contained in:
M66B 2023-12-02 07:16:47 +01:00
parent 1c02a00092
commit e511d64e7b
1 changed files with 7 additions and 0 deletions

View File

@ -144,8 +144,15 @@ public class TextHelper {
codepoint = s.codePointAt(i);
i += Character.charCount(codepoint);
us = Character.UnicodeScript.of(codepoint);
if (Character.isSpaceChar(codepoint)) {
script = null;
continue;
}
if (us.equals(Character.UnicodeScript.COMMON))
continue;
if (script == null)
script = us;
else if (!us.equals(script))