Skip to content
Tcl Source Code History Of Ticket 3085863fffffffffffffffffffffffffffffffff
Login

History Of Ticket 3085863fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 3085863fffffffffffffffffffffffffffffffff

  1. Ticket change [eef87c5f55] (rid 108915) by lars_h on 2010-10-12 11:52:18:

    1. assignee initialized to: "nijtmans"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      It seems the tables in tclUniData.c (i.e., what class the various characters belong to) are based on a UnicodeData.txt file that is at least 9 years old, since they have been unchanged for at least that long. This means for example \u0220 (LATIN CAPITAL LETTER N WITH LONG RIGHT LEG) is not considered to be alphabetic by Tcl
      
      % string is alpha \u0220
      0
      
      despite it being listed as having class Lu in http://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt.
      
      A possible factor could be that tools/uniParse.tcl states its input should be the file
      
        ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData-Latest.txt
      
      which doesn't exist anymore; there is only a UnicodeData.txt which presumably serves the same purpose.
      
      Another factor could be worry that updating these tables could reopen the "Unicode beyond \uFFFF" can of worms, but the CVS comments for tclUniData.c v1.4 says it was generated from the UnicodeData.txt for Unicode 3.1.0, and (if I recall it correctly) that is precisely the first version that added non-BMP characters, so we've already jumped that particular bullet.
      
      
    4. foundin initialized to: "obsolete: 8.6b1.1"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "lars_h"
    10. subsystem initialized to: "44. UTF-8 Strings"
    11. title initialized to: "tclUniData 9 years old"
    12. type initialized to: "Bug"
  2. Ticket change [3e2816915b] (rid 121216) by nijtmans on 2010-10-12 22:28:53:

    1. icomment:
      
      
      File Added - 389731: 3085863.patch
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  3. Ticket change [c0f484af2f] (rid 111253) by nijtmans on 2010-10-12 22:37:25:

    1. assignee changed to: "hobbs"
    2. icomment:
      Jeff, I did what Lars suggested, re-generating the necessary files with the latest UnicodeData.txt. The only 'real' thing I had to change is the type static variable
      pageMap, from unsigned char to unsigned const, because there are more
      than 256 maps now. Here is the patch (after some more manual changes
      to regc_locale.c).
      
      All test seem to run fine.
      Please evaluate, is there anything I am missing?
      
      
    3. login: "nijtmans"
    4. mimetype: "text/plain"
    5. username: "nijtmans"
  4. Ticket change [b3962c8ab2] (rid 124884) by lars_h on 2010-10-13 19:20:32:

    1. 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.
      
      
      
      
    2. login: "lars_h"
    3. mimetype: "text/plain"
    4. username: "lars_h"
  5. Ticket change [ca82b6d499] (rid 95359) by nijtmans on 2010-10-13 22:02:20:

    1. icomment:
      
      
      File Deleted - 389731: 
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  6. Ticket change [e4c38a5052] (rid 88013) by nijtmans on 2010-10-13 22:02:59:

    1. icomment:
      
      
      File Added - 389834: 3085863.patch
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  7. Add attachment "3085863.patch" [173568d47f] (rid 122449) by nijtmans on 2010-10-13 22:02:59.

  8. Ticket change [1da9224b1e] (rid 90848) by nijtmans on 2010-10-13 22:07:08:

    1. icomment:
      New attempt. Didn't try your code (which is obvously the right way),
      just stripped of the out-of-range characters from UnicodeData.txt
      before running the tools. Here is the result, a new patch.
      The table has some 2048 elements now, so that looks more
      reasonable, but still more than 256.
      
      Is this better?
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  9. Ticket change [46690f6a1e] (rid 99513) by nijtmans on 2010-10-13 22:17:26:

    1. icomment:
      After this patch:
        % string is alpha \u0220
        1
      
      So it looks like it works!
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  10. Ticket change [f9c9bdb25d] (rid 91756) by lars_h on 2010-10-14 19:12:05:

    1. icomment:
      Changing uni::shift to 6 (is currently 5, but for some reason a 6 is hardcoded in what uniParse.tcl writes to stdout) lets you get by with 208 groups. Each +1 increase in this doubles the length of the groupMap though, so perhaps it's cheaper to let the entries in the pageMap be swell to 16 bits.
      
      
    2. login: "lars_h"
    3. mimetype: "text/plain"
    4. username: "lars_h"
  11. Ticket change [16b3d32e2e] (rid 124757) by nijtmans on 2010-10-15 22:28:08:

    1. icomment:
      Checked in in HEAD. Left open because of:
      - More tests should be added
      - Backport to 8.5/8.4??
      But before doing that, I would like to receive
      more feedback that this is really OK, not
      introducing any problem. I cannot find
      anything wrong, but 9 years of changes
      is a long time........
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  12. Ticket change [4ed714a7d7] (rid 125714) by nijtmans on 2010-10-23 14:34:45:

    1. assignee changed to: "nijtmans"
    2. icomment:
      Added more tests, and backported to 8.5.
      
      Any interest for 8.4 too?
      
      
    3. login: "nijtmans"
    4. mimetype: "text/plain"
    5. username: "nijtmans"
  13. Ticket change [c911180b70] (rid 122221) by dkf on 2010-10-24 14:25:16:

    1. icomment:
      Probably not worth your time. 8.4 is probably EOLed now unless someone finds something seriously wrong with it (security hole or crash-bug).
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  14. Ticket change [e55fd10d20] (rid 88117) by nijtmans on 2010-12-06 20:00:27:

    1. closedate changed to: "2010-12-06T13:00:27"
    2. closer changed to: "nijtmans"
    3. icomment:
      
      
      allow_comments - 1
      
      It seems everything is OK, so closing
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "nijtmans"