Skip to content
Tcl Source Code History Of Ticket 10c2c17c32ab68e6
Login

History Of Ticket 10c2c17c32ab68e6

Artifacts Associated With Ticket 10c2c17c32ab68e6

  1. Ticket change [74030b1761] (rid 208584) by apnadkarni on 2023-02-06 17:01:49:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      While beefing up test cases for encoders, the following seems suspect to me.
      
      ```
      % proc codepoints {s} {join [lmap c [split $s ""] {
          string cat U+ [format %.8X [scan $c %c]]}]
      }
      % codepoints [encoding convertfrom utf-32le \x41\x00\x00\x00\x00\xD8\x00\x00\x42\x00\x00\x00]
      U+00000041 U+000000F0 U+00000042
      ```
      
      Where does the U+000000F0 come from? It seems strange that 0x0000D800 gets mapped to that value. Am I missing something?
      
      Tcl9 seems fine (maps to U+D800)
      
    5. foundin initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "apnadkarni"
    13. subsystem initialized to: "16. Commands A-H"
    14. title initialized to: "UTF-LE32 encoder mapping of surrogates"
    15. type initialized to: "Bug"
  2. Ticket change [9d8934b42d] (rid 208585) by apnadkarni on 2023-02-06 17:02:15:

    1. login: "apnadkarni"
    2. mimetype: "text/plain"
    3. severity changed to: "Important"
  3. Ticket change [f264613885] (rid 208588) by jan.nijtmans on 2023-02-06 21:18:25:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      This happens because of the combining behavior of Tcl_UniCharToUtf(), which Tcl 9.0 doesn't do any more by default. Easy to fix. Will do.
      
      You will realize that this is invalid UTF-32. When Tcl_UniCharToUtf() receives an upper surrogate, it will output the first byte of the 4-byte UTF-8 encoding (which is 0xF0, in this case). Feeding Tcl_UniCharToUtf() a lower surrogate will complete the remaining 3 bytes. In case of UTF-32, this combining should not be done, but since Tcl_UniCharToUtf() is used for UTF-16 too, that's where the problem comes from. As you already found out, in Tcl 9.0 this is corrected.
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
  4. Ticket change [43348994a9] (rid 208596) by apnadkarni on 2023-02-07 07:38:49:

    1. icomment:
      Yes, I know it is invalid UTF-32. I'm adding tests for handling of invalid byte sequences under different profiles. If errors are not raised, the conversion should be consistent which is what I was checking.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  5. Ticket change [6cdb9ac9d5] (rid 208610) by jan.nijtmans on 2023-02-07 15:02:10:

    1. icomment: "Proposed fix [0bb13aadb6e3e553|here]"
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  6. Ticket change [0642977d2a] (rid 208619) by apnadkarni on 2023-02-08 15:38:29:

    1. icomment:
      With the proposed fix, all current tests pass in my apn-encoding-profile branch. Just FYI
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  7. Ticket change [3624f5267d] (rid 208625) by jan.nijtmans on 2023-02-09 07:57:22:

    1. icomment:
      The bug-fix introduces another (minor) bug. Test-cases added. Still to be fixed.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  8. Ticket change [72f8cf14bf] (rid 208696) by jan.nijtmans on 2023-02-13 08:40:31:

    1. closedate changed to: "2459988.86147389"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Fixed [26aadbbd1f1d6290|here]
      
      Thanks, Ashok, for the bug-report!
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  9. Ticket change [12b9a533fe] (rid 208700) by jan.nijtmans on 2023-02-13 10:14:47:

    1. closer changed to: "nobody"
    2. foundin changed to: "9.0"
    3. icomment:
      After merging the fix to 9.0, it turns out that (new) testcase encoding-16.15 still fails there (it passes in 8.7). So, cannot close this ticket yet, but moving it 8.7 -> 9.0.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "None"
    7. status changed to: "Open"
  10. Ticket change [b446e51830] (rid 208750) by apnadkarni on 2023-02-15 05:38:31:

    1. icomment:
      I think there is still an issue even with 8.7, not just 9.
      
      ```
      % codepoints [encoding convertfrom -strict -failindex idx utf-32le \x41\x00\x00\x00\x00\xD8\x00\x00\x42\x00\x00\x00]
      U+000041 U+00FFFD
      % set idx
      4
      ```
      
      idx is correct but the return value has an extra character.
      
      This is with checkout [84f30c5d4e]
      
      /Ashok
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  11. Ticket change [bcd3cf0427] (rid 208757) by jan.nijtmans on 2023-02-15 07:30:54:

    1. icomment: "Indeed: [6349e0c2e15e07ab]. Thanks!"
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  12. Ticket change [e1db249ccd] (rid 208825) by jan.nijtmans on 2023-02-16 21:31:00:

    1. closedate changed to: "2459992.39653124"
    2. closer changed to: "jan.nijtmans"
    3. foundin changed to: "8.7"
    4. icomment:
      Reason for encoding-16.15 failure was in the testcase, not in the code. Fixed now.
      
      So, closing.
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"