Overview
| Artifact ID: | b3962c8ab247f96f42e7624f44ef1f648045eee2 |
|---|---|
| Ticket: | 3085863fffffffffffffffffffffffffffffffff
tclUniData 9 years old |
| User & Date: | lars_h on 2010-10-13 19:20:32 |
Changes
- icomment:
There is something slightly odd here. The current pageMap vector is indexed by an 11-bit integer (11 = 16 - OFFSET_BITS), meaning 2048 distinct elements can be accessed, but the vector has 5886 elements! Presumably it contains data also for non-BMP characters :-), even though Tcl can't access it :-(. Looking at uniParse.tcl, it indeed does not have any provisions for ignoring data if the codepoint is out of range. And what is perhaps worse: It only uses the first four hex digits as codepoint (the index variable). That's a bug! (So the data for unaccessible characters was probably wrong anyway.) Suggested fix: Change the lines scan [lindex $items 0] %4x index set index [format 0x%0.4x $index] to scan [lindex $items 0] %x index if {$index > 0xFFFF} then { # Ignore non-BMP characters, as long as Tcl doesn't support them continue } set index [format 0x%0.4x $index] I wouldn't be surprised if that solves the more-than-256 groups problem as well. - login: "lars_h"
- mimetype: "text/plain"
- username: "lars_h"