Changes On Branch tip-726-jan
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch tip-726-jan Excluding Merge-Ins

This is equivalent to a diff from 1857668b9f to f95a112489

2025-09-01
11:03
Update UNICODE_OUT_OF_RANGE to handle all planes. Remove unneeded UNICODE_OUT_OF_RANGE() usage check-in: 289a3340fc user: jan.nijtmans tags: trunk, main
04:58
Merge 9.0 - Mount zipfs early - see [87b69745be] check-in: f8f1cb7590 user: apnadkarni tags: trunk, main
2025-08-31
20:13
Final verdict, without test expectation changes Closed-Leaf check-in: f95a112489 user: jan.nijtmans tags: tip-726-jan
20:03
Oops, 21 bits, not 17 bits check-in: 1857668b9f user: jan.nijtmans tags: trunk, main
19:14
Final verdict, without test expectation changes check-in: c1ea8981ee user: jan.nijtmans tags: tip-726-jan
17:16
Merge 9.0. Fix TIP #726 implementation, so all functions give the same answer as Tcl 9.0 for out-of-... check-in: cc4f7b61e2 user: jan.nijtmans tags: trunk, main

Changes to generic/tclUtf.c.
12
13
14
15
16
17
18
19

20
21
22
23
24
25
26
12
13
14
15
16
17
18

19
20
21
22
23
24
25
26







-
+







#include "tclInt.h"
#include "../utf8proc/utf8proc.h"

/*
 * Include the static character classification tables and macros.
 */

#define UNICODE_OUT_OF_RANGE(ch)	(((ch) & 0x1FFFFF) >= 0x323C0)
#define UNICODE_OUT_OF_RANGE(ch)	(((ch) & 0x1FFFFF) >= 0x110000)

/*
 * The following masks are used for fast character category tests. The x_BITS
 * values are shifted right by the category value to determine whether the
 * given category is included in the set.
 */
enum Utf8ProcCharacterCategoryMasks {
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2199
2200
2201
2202
2203
2204
2205


2206
2207
2208
2209
2210
2211
2212







-
-







    /*
     * If the character is within the first 127 characters, just use the
     * standard C function, otherwise consult the Unicode table.
     */

    if (ch < 0x80) {
	return TclIsSpaceProcM((char) ch);
    } else if (UNICODE_OUT_OF_RANGE(ch)) {
	return 0;
    } else if (ch == 0x0085 || ch == 0x180E || ch == 0x200B
	    || ch == 0x202F || ch == 0x2060 || ch == 0xFEFF) {
	return 1;
    } else {
	return (UTF8PROC_SPACE_BITS >> utf8proc_category(ch)) & 1;
    }
}