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

History Of Ticket 1236896fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1236896fffffffffffffffffffffffffffffffff

  1. Ticket change [762474e58d] (rid 105521) by rmax on 2005-07-12 18:40:41:

    1. assignee initialized to: "nijtmans"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      This patch introduces a Tcl_UtfNcasecmp() function and
      uses it as a replacement for strcasecmp in [lsearch],
      [lsort], and [switch], when the -nocase option is given.
      
      "make genstubs" is needed after applying the patch.
      
      A TIP for this still has to be written.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "rmax"
    9. subsystem initialized to: "44. UTF-8 Strings"
    10. title initialized to:
      make -nocase behave correct with non-ASCII characters
      
    11. type initialized to: "Patch"
  2. Ticket change [0d94513b69] (rid 114390) by rmax on 2005-07-13 01:40:41:

    1. icomment:
      
      
      File Added - 141834: Tcl_Utfcasecmp.patch
      
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  3. Add attachment "Tcl_Utfcasecmp.patch" [515f49397f] (rid 126132) by rmax on 2005-07-13 01:40:41.

  4. Ticket change [b063edf44d] (rid 97974) by dkf on 2005-07-13 15:20:12:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      We could try doing this in two stages.
      
      Stage #1: Define a TclUtfNCaseCmp function (or something
      similar) that is *not* in any stubs table, but which is used
      to fix the guts of the various Tcl commands listed. This
      part can be done now.
      
      Stage #2: Change the name of the function to something
      exported and put it in the stubs table. This is the stage
      that needs documentation work and a TIP.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  5. Ticket change [55ce46f622] (rid 94212) by rmax on 2005-07-13 15:35:05:

    1. icomment:
      Logged In: YES 
      user_id=124643
      
      Whoops, there is a typo in my initial comment:
      Tcl_UtfNcasecmp() already exists, and my patch adds a
      Tcl_Utfcasecmp() function (without "N").
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  6. Add attachment "Tcl_Utfcasecmp.patch" [637011273d] (rid 92576) by rmax on 2005-07-13 20:57:43.

  7. Ticket change [1bc971219d] (rid 123206) by rmax on 2005-07-13 20:57:43:

    1. icomment:
      
      
      File Added - 141929: Tcl_Utfcasecmp.patch
      
      Logged In: YES 
      user_id=124643
      
      I am uploading a revised version of the patch that changes
      the name of the new API to Tcl_UtfCasecmp and removes a
      misleading comment that was a copy-n-paste oversight.
      
      Meanwhile I timed [lsort -nocase] and found it to take about
      twice as long after adding this patch.
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  8. Ticket change [45ba8c6485] (rid 99397) by dgp on 2005-07-14 05:02:52:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      the new test cmdIL-5.6 has values
      I assume are in the utf-8 encoding.
      
      Since the *.test files get [source]d
      in [encoding system], that's not
      really portable.  Would be better to
      use \uHHHH backslash substitution
      to construct the test strings and results.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [e29b5f2da4] (rid 87660) by dgp on 2005-07-14 05:07:16:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      otherwise this looks ok.
      
      I agree with dkf that a 
      two-stage implementation
      is the way to go.  Get the fix
      in immediately.  Make it public
      as approved.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [4f43d809a3] (rid 125798) by mistachkin on 2005-07-14 14:42:00:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      
      Why does [lsort -nocase] take twice as long with this patch?
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  11. Ticket change [5940ac84a8] (rid 117947) by dkf on 2005-07-14 15:16:07:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      'cos usually strcasecmp() assumes one-byte-per-char and
      probably ISO8859-* so case conversion can be done very
      quickly. The updated version has to de-UTF8 each character
      before case conversion.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  12. Ticket change [3841d1048c] (rid 112165) by rmax on 2005-07-14 15:21:27:

    1. icomment:
      Logged In: YES 
      user_id=124643
      
      Look at the implementation of Tcl_UtfCasecmp. It has to do
      much more work than strcasecmp does to give correct results
      for non-ASCII characters.
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  13. Ticket change [0594913814] (rid 89088) by rmax on 2005-07-15 02:16:35:

    1. icomment:
      Logged In: YES 
      user_id=124643
      
      The new version of the patch does special-casing for ASCII
      characters. It makes [lsearch] only slightly slower on lists
      of pure ASCII strings, and also improves performance for
      strings that contain a mix of ASCII and other characters.
      
      It also renames follows dkf's advice and makes the function
      private so that it can be applied without a TIP.
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  14. Ticket change [af11f495ff] (rid 97744) by rmax on 2005-07-15 02:16:37:

    1. icomment:
      
      
      File Added - 142083: TclUtfcasecmp-3.patch
      
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  15. Add attachment "TclUtfcasecmp-3.patch" [1ae97e0f97] (rid 123056) by rmax on 2005-07-15 02:16:37.

  16. Ticket change [f4d9ebe987] (rid 129997) by dgp on 2005-07-15 03:08:05:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      It looks like the latest patch
      doesn't limit its case-equivalencies
      to alphabetic characters.
      
      For example, the characters
      '[' (\x5b) and '{' (\x7b) get treated
      as -nocase equivalents because
      they are the same with the 0x20
      bit forced set.
      
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [3a7bcab129] (rid 112570) by dgp on 2005-07-15 03:15:31:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      demo session:
      
      % lsort -nocase {@ `}
      @ `
      % lsort -nocase {` @}
      ` @
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  18. Ticket change [c7896aeed1] (rid 121946) by rmax on 2005-07-15 05:21:39:

    1. icomment:
      Logged In: YES 
      user_id=124643
      
      OK, so this time it should really be correct, as I have
      verified that TclUtfCasecmp produces exactly the same
      results as strcasecmp for any combination of characters
      between 0x01 and 0x7f, inclusive. I've also added dgp's demo
      to the test suite.
      
      I haven't yet timed this version, as I wrote it at home and
      the code I used for the performance comparision is at work.
      I'll do that tomorrow morning and report the results here.
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  19. Add attachment "TclUtfCasecmp-4.patch" [f095269521] (rid 109214) by rmax on 2005-07-15 05:21:40.

  20. Ticket change [db0f9a196e] (rid 107893) by rmax on 2005-07-15 05:21:46:

    1. icomment:
      
      
      File Added - 142100: TclUtfCasecmp-4.patch
      
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  21. Ticket change [5aaea0309a] (rid 118185) by dgp on 2005-07-18 21:46:04:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Here's an alternative patch.
      Please check its performance
      against the earlier patch.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  22. Add attachment "1236896.patch" [4db28c9d8d] (rid 127092) by dgp on 2005-07-18 21:46:05.

  23. Ticket change [fe1db40c92] (rid 108526) by dgp on 2005-07-18 21:46:06:

    1. icomment:
      
      
      File Added - 142444: 1236896.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  24. Ticket change [e86f603f85] (rid 104643) by rmax on 2005-07-19 00:45:19:

    1. icomment:
      Logged In: YES 
      user_id=124643
      
      This is the fastest version I've been able to come up with.
      The patch now adds the same ASCII optimisations to
      Tcl_UtfNcmp and Tcl_UtfNcasecmp.
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  25. Ticket change [ad51c286de] (rid 101451) by rmax on 2005-07-19 00:45:20:

    1. icomment:
      
      
      File Added - 142464: TclUtfCasecmp-10.patch
      
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  26. Add attachment "TclUtfCasecmp-10.patch" [c56b30b1ab] (rid 112001) by rmax on 2005-07-19 00:45:20.

  27. Ticket change [37f1406ebc] (rid 112118) by jenglish on 2008-02-29 04:48:36:

    1. icomment:
      Logged In: YES 
      user_id=68433
      Originator: NO
      
      See also #1902648.  This is a portability problem as well as a correctness problem.
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"
  28. Ticket change [1414850c0c] (rid 132610) by jan.nijtmans on 2013-07-03 11:12:52:

    1. closer changed to: "nobody"
    2. comment changed to:
      This patch introduces a Tcl_UtfNcasecmp() function and
      uses it as a replacement for strcasecmp in [lsearch],
      [lsort], and [switch], when the -nocase option is given.
      
      "make genstubs" is needed after applying the patch.
      
      A TIP for this still has to be written.
      
    3. icomment:
      Dup of [3613609]
      
      Still want to write a TIP to put this function in the (public) stubs?
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. severity changed to: "Minor"
    8. status changed to: "Pending"
  29. Ticket change [bbe86424b3] (rid 135571) by dkf on 2013-11-12 14:41:00:

    1. closedate changed to: "2456609.11181262"
    2. closer changed to: "dkf"
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. status changed to: "Closed"