Skip to content

Commit

Permalink
Use "surrogates" instead of "category Cs"
Browse files Browse the repository at this point in the history
The former is easier to understand.
  • Loading branch information
DemiMarie committed Jan 31, 2023
1 parent 039273c commit f3906b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion gentbl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ def print_interval(interval, last_cat):
if last_cat == 'Cn':
return
if interval[0] != interval[1]:
print(f' case 0x{interval[0]:X} ... 0x{interval[1]:X}: // category {last_cat}')
print(f' case 0x{interval[0]:X} ... 0x{interval[1]:X}: // category {last_cat}'
.replace('category Cs', 'surrogates'))
else:
print(f' case 0x{interval[0]:X}: // category {last_cat}')
import sys
Expand Down
2 changes: 1 addition & 1 deletion qrexec-lib/unpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static int validate_utf8_char(const unsigned char *untrusted_c) {
case 0x2060 ... 0x2064: // category Cf
case 0x2066 ... 0x206F: // category Cf
case 0x3000: // category Zs
case 0xD800 ... 0xDFFF: // category Cs
case 0xD800 ... 0xDFFF: // surrogates
case 0xE000 ... 0xF8FF: // category Co
case 0xFEFF: // category Cf
case 0xFFF9 ... 0xFFFB: // category Cf
Expand Down

0 comments on commit f3906b1

Please sign in to comment.