Skip to content

Commit d887297

Browse files
chrisbrabrammool
authored andcommitted
patch 8.2.3068: Unicode tables are slightly outdated
Problem: Unicode tables are slightly outdated. Solution: Update the tables for Unicode release 13. (Christian Brabandt closes #8430)
1 parent 1d1ce61 commit d887297

3 files changed

Lines changed: 78 additions & 35 deletions

File tree

runtime/tools/unicode.vim

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ func! BuildWidthTable(pattern, tableName)
195195
let end = -1
196196
let ranges = []
197197
let dataidx = 0
198+
" Account for indentation differences between ambiguous and doublewidth
199+
" table in mbyte.c
200+
if a:pattern == 'A'
201+
let spc = ' '
202+
else
203+
let spc = "\t"
204+
endif
198205
for p in s:widthprops
199206
if p[1][0] =~ a:pattern
200207
if p[0] =~ '\.\.'
@@ -229,7 +236,7 @@ func! BuildWidthTable(pattern, tableName)
229236
else
230237
if start >= 0
231238
" produce previous range
232-
call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
239+
call add(ranges, printf("%s{0x%04x, 0x%04x},", spc, start, end))
233240
if a:pattern == 'A'
234241
call add(s:ambitable, [start, end])
235242
else
@@ -243,7 +250,7 @@ func! BuildWidthTable(pattern, tableName)
243250
endif
244251
endfor
245252
if start >= 0
246-
call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
253+
call add(ranges, printf("%s{0x%04x, 0x%04x},", spc, start, end))
247254
if a:pattern == 'A'
248255
call add(s:ambitable, [start, end])
249256
else
@@ -254,11 +261,20 @@ func! BuildWidthTable(pattern, tableName)
254261
" New buffer to put the result in.
255262
new
256263
exe "file " . a:tableName
257-
call setline(1, " static struct interval " . a:tableName . "[] =")
258-
call setline(2, " {")
264+
if a:pattern == 'A'
265+
call setline(1, "static struct interval " . a:tableName . "[] =")
266+
call setline(2, "{")
267+
else
268+
call setline(1, " static struct interval " . a:tableName . "[] =")
269+
call setline(2, " {")
270+
endif
259271
call append('$', ranges)
260272
call setline('$', getline('$')[:-2]) " remove last comma
261-
call setline(line('$') + 1, " };")
273+
if a:pattern == 'A'
274+
call setline(line('$') + 1, "};")
275+
else
276+
call setline(line('$') + 1, " };")
277+
endif
262278
wincmd p
263279
endfunc
264280

src/mbyte.c

Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,8 @@ utf_char2cells(int c)
13891389
{0x26ce, 0x26ce},
13901390
{0x26d4, 0x26d4},
13911391
{0x26ea, 0x26ea},
1392-
{0x26f2, 0x26f5},
1392+
{0x26f2, 0x26f3},
1393+
{0x26f5, 0x26f5},
13931394
{0x26fa, 0x26fa},
13941395
{0x26fd, 0x26fd},
13951396
{0x2705, 0x2705},
@@ -1414,8 +1415,7 @@ utf_char2cells(int c)
14141415
{0x3099, 0x30ff},
14151416
{0x3105, 0x312f},
14161417
{0x3131, 0x318e},
1417-
{0x3190, 0x31ba},
1418-
{0x31c0, 0x31e3},
1418+
{0x3190, 0x31e3},
14191419
{0x31f0, 0x321e},
14201420
{0x3220, 0x3247},
14211421
{0x3250, 0x4dbf},
@@ -1431,8 +1431,10 @@ utf_char2cells(int c)
14311431
{0xff01, 0xff60},
14321432
{0xffe0, 0xffe6},
14331433
{0x16fe0, 0x16fe3},
1434+
{0x16ff0, 0x16ff1},
14341435
{0x17000, 0x187f7},
1435-
{0x18800, 0x18af2},
1436+
{0x18800, 0x18cd5},
1437+
{0x18d00, 0x18d08},
14361438
{0x1b000, 0x1b11e},
14371439
{0x1b150, 0x1b152},
14381440
{0x1b164, 0x1b167},
@@ -1467,20 +1469,22 @@ utf_char2cells(int c)
14671469
{0x1f680, 0x1f6c5},
14681470
{0x1f6cc, 0x1f6cc},
14691471
{0x1f6d0, 0x1f6d2},
1470-
{0x1f6d5, 0x1f6d5},
1472+
{0x1f6d5, 0x1f6d7},
14711473
{0x1f6eb, 0x1f6ec},
1472-
{0x1f6f4, 0x1f6fa},
1474+
{0x1f6f4, 0x1f6fc},
14731475
{0x1f7e0, 0x1f7eb},
1474-
{0x1f90d, 0x1f971},
1475-
{0x1f973, 0x1f976},
1476-
{0x1f97a, 0x1f9a2},
1477-
{0x1f9a5, 0x1f9aa},
1478-
{0x1f9ae, 0x1f9ca},
1476+
{0x1f90c, 0x1f93a},
1477+
{0x1f93c, 0x1f945},
1478+
{0x1f947, 0x1f978},
1479+
{0x1f97a, 0x1f9cb},
14791480
{0x1f9cd, 0x1f9ff},
1480-
{0x1fa70, 0x1fa73},
1481+
{0x1fa70, 0x1fa74},
14811482
{0x1fa78, 0x1fa7a},
1482-
{0x1fa80, 0x1fa82},
1483-
{0x1fa90, 0x1fa95},
1483+
{0x1fa80, 0x1fa86},
1484+
{0x1fa90, 0x1faa8},
1485+
{0x1fab0, 0x1fab6},
1486+
{0x1fac0, 0x1fac2},
1487+
{0x1fad0, 0x1fad6},
14841488
{0x20000, 0x2fffd},
14851489
{0x30000, 0x3fffd}
14861490
};
@@ -2350,7 +2354,7 @@ utf_iscomposing(int c)
23502354
{0x0b3e, 0x0b44},
23512355
{0x0b47, 0x0b48},
23522356
{0x0b4b, 0x0b4d},
2353-
{0x0b56, 0x0b57},
2357+
{0x0b55, 0x0b57},
23542358
{0x0b62, 0x0b63},
23552359
{0x0b82, 0x0b82},
23562360
{0x0bbe, 0x0bc2},
@@ -2377,7 +2381,7 @@ utf_iscomposing(int c)
23772381
{0x0d4a, 0x0d4d},
23782382
{0x0d57, 0x0d57},
23792383
{0x0d62, 0x0d63},
2380-
{0x0d82, 0x0d83},
2384+
{0x0d81, 0x0d83},
23812385
{0x0dca, 0x0dca},
23822386
{0x0dcf, 0x0dd4},
23832387
{0x0dd6, 0x0dd6},
@@ -2424,7 +2428,7 @@ utf_iscomposing(int c)
24242428
{0x1a55, 0x1a5e},
24252429
{0x1a60, 0x1a7c},
24262430
{0x1a7f, 0x1a7f},
2427-
{0x1ab0, 0x1abe},
2431+
{0x1ab0, 0x1ac0},
24282432
{0x1b00, 0x1b04},
24292433
{0x1b34, 0x1b44},
24302434
{0x1b6b, 0x1b73},
@@ -2453,6 +2457,7 @@ utf_iscomposing(int c)
24532457
{0xa806, 0xa806},
24542458
{0xa80b, 0xa80b},
24552459
{0xa823, 0xa827},
2460+
{0xa82c, 0xa82c},
24562461
{0xa880, 0xa881},
24572462
{0xa8b4, 0xa8c5},
24582463
{0xa8e0, 0xa8f1},
@@ -2488,6 +2493,7 @@ utf_iscomposing(int c)
24882493
{0x10a3f, 0x10a3f},
24892494
{0x10ae5, 0x10ae6},
24902495
{0x10d24, 0x10d27},
2496+
{0x10eab, 0x10eac},
24912497
{0x10f46, 0x10f50},
24922498
{0x11000, 0x11002},
24932499
{0x11038, 0x11046},
@@ -2500,6 +2506,7 @@ utf_iscomposing(int c)
25002506
{0x11180, 0x11182},
25012507
{0x111b3, 0x111c0},
25022508
{0x111c9, 0x111cc},
2509+
{0x111ce, 0x111cf},
25032510
{0x1122c, 0x11237},
25042511
{0x1123e, 0x1123e},
25052512
{0x112df, 0x112ea},
@@ -2522,6 +2529,11 @@ utf_iscomposing(int c)
25222529
{0x116ab, 0x116b7},
25232530
{0x1171d, 0x1172b},
25242531
{0x1182c, 0x1183a},
2532+
{0x11930, 0x11935},
2533+
{0x11937, 0x11938},
2534+
{0x1193b, 0x1193e},
2535+
{0x11940, 0x11940},
2536+
{0x11942, 0x11943},
25252537
{0x119d1, 0x119d7},
25262538
{0x119da, 0x119e0},
25272539
{0x119e4, 0x119e4},
@@ -2549,6 +2561,8 @@ utf_iscomposing(int c)
25492561
{0x16f4f, 0x16f4f},
25502562
{0x16f51, 0x16f87},
25512563
{0x16f8f, 0x16f92},
2564+
{0x16fe4, 0x16fe4},
2565+
{0x16ff0, 0x16ff1},
25522566
{0x1bc9d, 0x1bc9e},
25532567
{0x1d165, 0x1d169},
25542568
{0x1d16d, 0x1d172},
@@ -2650,6 +2664,7 @@ static struct interval emoji_all[] =
26502664
{0x2699, 0x2699},
26512665
{0x269b, 0x269c},
26522666
{0x26a0, 0x26a1},
2667+
{0x26a7, 0x26a7},
26532668
{0x26aa, 0x26ab},
26542669
{0x26b0, 0x26b1},
26552670
{0x26bd, 0x26be},
@@ -2695,7 +2710,8 @@ static struct interval emoji_all[] =
26952710
{0x3299, 0x3299},
26962711
{0x1f004, 0x1f004},
26972712
{0x1f0cf, 0x1f0cf},
2698-
{0x1f170, 0x1f189},
2713+
{0x1f170, 0x1f171},
2714+
{0x1f17e, 0x1f17f},
26992715
{0x1f18e, 0x1f18e},
27002716
{0x1f191, 0x1f19a},
27012717
{0x1f1e6, 0x1f1ff},
@@ -2735,21 +2751,25 @@ static struct interval emoji_all[] =
27352751
{0x1f5fa, 0x1f64f},
27362752
{0x1f680, 0x1f6c5},
27372753
{0x1f6cb, 0x1f6d2},
2754+
{0x1f6d5, 0x1f6d7},
27382755
{0x1f6e0, 0x1f6e5},
27392756
{0x1f6e9, 0x1f6e9},
27402757
{0x1f6eb, 0x1f6ec},
27412758
{0x1f6f0, 0x1f6f0},
2742-
{0x1f6f3, 0x1f6f9},
2743-
{0x1f910, 0x1f93a},
2744-
{0x1f93c, 0x1f93e},
2745-
{0x1f940, 0x1f945},
2746-
{0x1f947, 0x1f970},
2747-
{0x1f973, 0x1f976},
2748-
{0x1f97a, 0x1f97a},
2749-
{0x1f97c, 0x1f9a2},
2750-
{0x1f9b0, 0x1f9b9},
2751-
{0x1f9c0, 0x1f9c2},
2752-
{0x1f9d0, 0x1f9ff}
2759+
{0x1f6f3, 0x1f6fc},
2760+
{0x1f7e0, 0x1f7eb},
2761+
{0x1f90c, 0x1f93a},
2762+
{0x1f93c, 0x1f945},
2763+
{0x1f947, 0x1f978},
2764+
{0x1f97a, 0x1f9cb},
2765+
{0x1f9cd, 0x1f9ff},
2766+
{0x1fa70, 0x1fa74},
2767+
{0x1fa78, 0x1fa7a},
2768+
{0x1fa80, 0x1fa86},
2769+
{0x1fa90, 0x1faa8},
2770+
{0x1fab0, 0x1fab6},
2771+
{0x1fac0, 0x1fac2},
2772+
{0x1fad0, 0x1fad6}
27532773
};
27542774

27552775
/*
@@ -3097,6 +3117,8 @@ static convertStruct foldCase[] =
30973117
{0xa7c4,0xa7c4,-1,-48},
30983118
{0xa7c5,0xa7c5,-1,-42307},
30993119
{0xa7c6,0xa7c6,-1,-35384},
3120+
{0xa7c7,0xa7c9,2,1},
3121+
{0xa7f5,0xa7f5,-1,1},
31003122
{0xab70,0xabbf,1,-38864},
31013123
{0xff21,0xff3a,1,32},
31023124
{0x10400,0x10427,1,40},
@@ -3321,6 +3343,8 @@ static convertStruct toLower[] =
33213343
{0xa7c4,0xa7c4,-1,-48},
33223344
{0xa7c5,0xa7c5,-1,-42307},
33233345
{0xa7c6,0xa7c6,-1,-35384},
3346+
{0xa7c7,0xa7c9,2,1},
3347+
{0xa7f5,0xa7f5,-1,1},
33243348
{0xff21,0xff3a,1,32},
33253349
{0x10400,0x10427,1,40},
33263350
{0x104b0,0x104d3,1,40},
@@ -3509,7 +3533,8 @@ static convertStruct toUpper[] =
35093533
{0xa794,0xa794,-1,48},
35103534
{0xa797,0xa7a9,2,-1},
35113535
{0xa7b5,0xa7bf,2,-1},
3512-
{0xa7c3,0xa7c3,-1,-1},
3536+
{0xa7c3,0xa7c8,5,-1},
3537+
{0xa7ca,0xa7f6,44,-1},
35133538
{0xab53,0xab53,-1,-928},
35143539
{0xab70,0xabbf,1,-38864},
35153540
{0xff41,0xff5a,1,-32},

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,8 @@ static char *(features[]) =
755755

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3068,
758760
/**/
759761
3067,
760762
/**/

0 commit comments

Comments
 (0)