Skip to content

Commit ca3f77c

Browse files
committed
Add CJK ranges for Unicode 14
1 parent e693fd0 commit ca3f77c

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

unicodetools/.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
33
<classpathentry kind="src" path=""/>
4-
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/cldr-code"/>
4+
<classpathentry combineaccessrules="false" kind="src" path="/cldr-code"/>
55
<classpathentry kind="lib" path="/cldr-all/cldr-code/target/test-classes"/>
66
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
77
<attributes>

unicodetools/org/unicode/text/UCD/UCD.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,9 @@ public static int mapToRepresentative(int ch, int rCompositeVersion) {
12811281
if (ch <= 0x9FFC && rCompositeVersion >= 0xd0000) {
12821282
return CJK_BASE;
12831283
}
1284+
if (ch <= 0x9FFF && rCompositeVersion >= 0xe0000) {
1285+
return CJK_BASE;
1286+
}
12841287
if (ch < 0xAC00) {
12851288
return ch;
12861289
}
@@ -1380,13 +1383,19 @@ public static int mapToRepresentative(int ch, int rCompositeVersion) {
13801383
if (ch <= 0x2A6DD && rCompositeVersion >= 0xd0000) {
13811384
return CJK_B_BASE;
13821385
}
1386+
if (ch <= 0x2A6DF && rCompositeVersion >= 0xe0000) {
1387+
return CJK_B_BASE;
1388+
}
13831389
// 2A700..2B73F; CJK Unified Ideographs Extension C
13841390
if (rCompositeVersion >= 0x50200) {
13851391
if (ch <= CJK_C_BASE)
13861392
{
13871393
return ch; // Extension C first char
13881394
}
1389-
if (ch < CJK_C_LIMIT) {
1395+
if (ch <= 0x2B734) {
1396+
return CJK_C_BASE;
1397+
}
1398+
if (ch <= 0x2B737 && rCompositeVersion >= 0xe0000) {
13901399
return CJK_C_BASE;
13911400
}
13921401
}

unicodetools/org/unicode/text/UCD/UCD_Types.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public interface UCD_Types {
4141
// 4E00;<CJK Ideograph, First>;Lo;0;L;;;;;N;;;;;
4242
// 9FFC;<CJK Ideograph, Last>;Lo;0;L;;;;;N;;;;;
4343
CJK_BASE = 0x4E00,
44-
CJK_LIMIT = 0x9FFC+1, // last changed in Unicode 13
44+
CJK_LIMIT = 0x9FFF+1, // last changed in Unicode 14
4545

4646
CJK_COMPAT_USED_BASE = 0xFA0E,
4747
CJK_COMPAT_USED_LIMIT = 0xFA2F+1,
@@ -54,12 +54,12 @@ public interface UCD_Types {
5454
//20000;<CJK Ideograph Extension B, First>;Lo;0;L;;;;;N;;;;;
5555
//2A6DD;<CJK Ideograph Extension B, Last>;Lo;0;L;;;;;N;;;;;
5656
CJK_B_BASE = 0x20000,
57-
CJK_B_LIMIT = 0x2A6DD+1, // last changed in Unicode 13
57+
CJK_B_LIMIT = 0x2A6DF+1, // last changed in Unicode 14
5858

5959
//2A700;<CJK Ideograph Extension C, First>;Lo;0;L;;;;;N;;;;;
6060
//2B734;<CJK Ideograph Extension C, Last>;Lo;0;L;;;;;N;;;;;
6161
CJK_C_BASE = 0x2A700,
62-
CJK_C_LIMIT = 0x2B734+1,
62+
CJK_C_LIMIT = 0x2B737+1, // last changed in Unicode 14
6363

6464
//2B740;<CJK Ideograph Extension D, First>;Lo;0;L;;;;;N;;;;;
6565
//2B81D;<CJK Ideograph Extension D, Last>;Lo;0;L;;;;;N;;;;;

0 commit comments

Comments
 (0)