From 6d2648a955be1a03076cfff57d28cd5a77405c93 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 15 Jan 2024 10:46:33 +0000 Subject: Bug [d63061a1ac]: "PRIVATE != CONTROL in Unicode". Leave out "Co" (private-use characters) from "string is control". --- generic/regc_locale.c | 6 ++---- generic/tclUtf.c | 5 +---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/generic/regc_locale.c b/generic/regc_locale.c index adeb0bd..2f0e210 100644 --- a/generic/regc_locale.c +++ b/generic/regc_locale.c @@ -299,11 +299,9 @@ static const chr alphaCharTable[] = { static const crange controlRangeTable[] = { {0x0, 0x1F}, {0x7F, 0x9F}, {0x600, 0x605}, {0x200B, 0x200F}, - {0x202A, 0x202E}, {0x2060, 0x2064}, {0x2066, 0x206F}, {0xE000, 0xF8FF}, - {0xFFF9, 0xFFFB} + {0x202A, 0x202E}, {0x2060, 0x2064}, {0x2066, 0x206F}, {0xFFF9, 0xFFFB} #if CHRBITS > 16 - ,{0x13430, 0x1343F}, {0x1BCA0, 0x1BCA3}, {0x1D173, 0x1D17A}, {0xE0020, 0xE007F}, - {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD} + ,{0x13430, 0x1343F}, {0x1BCA0, 0x1BCA3}, {0x1D173, 0x1D17A}, {0xE0020, 0xE007F} #endif }; diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 8d5d8f9..be185b0 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -26,7 +26,7 @@ #define ALPHA_BITS ((1 << UPPERCASE_LETTER) | (1 << LOWERCASE_LETTER) \ | (1 << TITLECASE_LETTER) | (1 << MODIFIER_LETTER) | (1<= 0xE0020) && (ch <= 0xE007F))) { return 1; } - if ((ch >= 0xF0000) && ((ch & 0xFFFF) <= 0xFFFD)) { - return 1; - } return 0; } return ((CONTROL_BITS >> GetCategory(ch)) & 1); -- cgit v0.12