Skip to content
Tcl Source Code History Of Ticket 53cad613d8a4de16
Login

History Of Ticket 53cad613d8a4de16

Artifacts Associated With Ticket 53cad613d8a4de16

  1. Ticket change [c0c0e30201] (rid 163990) by fvogel on 2018-06-16 06:05:38:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Since TIP 389 was committed in core-8-branch, that is since [e109760b1c], two tests from the Tk test suite started failing as follows:
      
      <verbatim>
      ==== font-4.12 font command: actual FAILED
      ==== Contents of test case:
      
          font actual {-family times} -- \ud800
      
      ---- Test generated error; Return code was: 1
      ---- Return code should have been one of: 0 2
      ---- errorInfo: expected a single character but got ""
          while executing
      "font actual {-family times} -- \ud800"
          ("uplevel" body line 2)
          invoked from within
      "uplevel 1 $script"
      ---- errorCode: TK VALUE FONT_SAMPLE
      ==== font-4.12 FAILED
      
      
      ==== font-4.15 font command: actual FAILED
      ==== Contents of test case:
      
          font actual {-family times} -- \udc00\ud800
      
      ---- Test completed normally; Return code was: 0
      ---- Return code should have been one of: 1
      ==== font-4.15 FAILED
      </verbatim>
      
      Both behaviors can be reproduced easily outside of the Tk test suite:
      
      <verbatim>
      % package require Tk
      8.7a2
      % font actual {-family times} -- \ud800    ; # font-4.12
      expected a single character but got ""
      % font actual {-family times} -- \udc00\ud800    ; # font-4.15
      -family times -size 12 -weight normal -slant roman -underline 0 -overstrike 0
      %
      </verbatim>
      
      Note that in contrast font-4.13 and font-4.14 do not fail, despite being very similar:
      
      <verbatim>
      % font actual {-family times} -- \udc00    ; # font-4.13
      -family times -size 12 -weight normal -slant roman -underline 0 -overstrike 0
      % font actual {-family times} -family -- \ud800\udc00    ; # font-4.14
      times
      </verbatim>
      
      I'm unsure whether implementation of TIP 389 has a bug, or if Tk should be changed to match TIP 389, but I'm inclined to suspect the former because the TIP states: <pre>As long as no Surrogates or characters >= U+010000 are used, all functions behave exactly the same as before.</pre>
      
    5. foundin initialized to: "core-8-branch"
    6. is_private initialized to: "0"
    7. login: "fvogel"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "a013af67114eccc19ad12b04f14923acea9e96b7"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "fvogel"
    14. subsystem initialized to: "44. UTF-8 Strings"
    15. title initialized to: "TIP 389 implementation makes Tk tests fail"
    16. type initialized to: "Bug"
  2. Ticket change [1bcd062e32] (rid 163991) by fvogel on 2018-06-16 06:05:50:

    1. assignee changed to: "jan.nijtmans"
    2. login: "fvogel"
    3. mimetype: "text/plain"
  3. Ticket change [e69e7096f8] (rid 163992) by fvogel on 2018-06-16 06:08:12:

    1. login: "fvogel"
    2. mimetype: "text/plain"
    3. title changed to:
      TIP 389 implementation makes Tk tests font-4.12 and font-4.15 fail
      
  4. Ticket change [5d39e1f479] (rid 164010) by jan.nijtmans on 2018-06-16 13:31:54:

    1. icomment:
      Thanks, François, for noticing this!  I'll have a look. Actually, Tk was already adapted here to match TIP-389, but after that some changes in surrogate handling were added to the Tcl implementation (to make it more robust).   The \ud800 character is a high surrogate, which is not expected in isolation, that's what this test is testing for.  I'm suspecting the compatibility function TkUtfToUniChar(), but I'll have a further look. It's not really a problem, since such a surrogate in isolation is invalid anyway. But at least Tk should react sensibly to it.
      
      Thanks!
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/plain"
  5. Ticket change [42e70e58a4] (rid 164042) by jan.nijtmans on 2018-06-17 16:16:37:

    1. closedate changed to: "2458287.17821156"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      The actual bug turned out to be in the function TclParseBackslash(). Fixed now in core-8-6-branch (for the benefit of androwish), core-8-branch and trunk.
      
      Thanks for your patience .... ;-)
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  6. Ticket change [577b1bfd85] (rid 164049) by fvogel on 2018-06-17 20:48:51:

    1. closedate changed to: "2458287.36725949"
    2. closer changed to: "fvogel"
    3. icomment:
      Confirmed it works for me as well.
      
      Many thanks, that was quick fixing!
      
    4. login: "fvogel"
    5. mimetype: "text/plain"
  7. Ticket change [fcc9e74792] (rid 164058) by jan.nijtmans on 2018-06-18 10:58:20:

    1. closedate changed to: "2458287.95718297"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Still, this bug is not 100% fixed yet, there are multiple ways for generating a UTF-8 representation, backslash handling is not the only one: Demonstration:
      
      % string length [format %c 0xd800]
      0
      
      The correct answer should be 1.  Stay tuned .... fix in progress.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/plain"