summaryrefslogtreecommitdiffstats
path: root/tools/uniParse.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-01 18:54:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-01 18:54:58 (GMT)
commita18e29f96b7b7a0699ed4d5df433b0b0660341e3 (patch)
tree2fc69d530f862f96aedd1ffe37b39f4153ccf273 /tools/uniParse.tcl
parent67acc8945524908e6b8e9e1f8b1f949d3a146e11 (diff)
downloadtcl-a18e29f96b7b7a0699ed4d5df433b0b0660341e3.zip
tcl-a18e29f96b7b7a0699ed4d5df433b0b0660341e3.tar.gz
tcl-a18e29f96b7b7a0699ed4d5df433b0b0660341e3.tar.bz2
Various Unicode handling enhancements, when building with TCL_UTF_MAX > 3, inspired by androwish. No effect if TCL_UTF_MAX=3 (which is the default)
Diffstat (limited to 'tools/uniParse.tcl')
-rw-r--r--tools/uniParse.tcl6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/uniParse.tcl b/tools/uniParse.tcl
index e33b3c7..8125790 100644
--- a/tools/uniParse.tcl
+++ b/tools/uniParse.tcl
@@ -396,7 +396,11 @@ enum {
* Unicode character tables.
*/
-#define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0xffff) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\])
+#if TCL_UTF_MAX > 3
+# define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0x1fffff) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\])
+#else
+# define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0xffff) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\])
+#endif
"
close $f