Skip to content
Tcl Source Code History Of Ticket 821620d417f604c4
Login

History Of Ticket 821620d417f604c4

Artifacts Associated With Ticket 821620d417f604c4

  1. Ticket change [b29857c701] (rid 209153) by apnadkarni on 2023-02-25 04:56:26:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      In Tcl 8.7,
      
      ```
      % package require Tcl
      8.7a6
      % codepoints [encoding convertfrom utf-8 [binary decode hex EDAFBFEDBFBF]]
      U+10FFFF
      ```
      
      In Tcl 9,
      
      ```
      % package require Tcl
      9.0a4
      % codepoints [encoding convertfrom utf-8 [binary decode hex EDAFBFEDBFBF]]
      U+00DBFF U+00DFFF
      ```
      
      Surrogate pairs are not allowed in strict utf-8 but the above is not strict. In my opinion, the Tcl 8.7 behavior is preferable but since this is non-conformant anyways, either behavior might be ok. But they should be consistent between Tcl 8 and 9.
      
    5. foundin initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to:
      Different handling of surrogates in utf-8 between Tcl8 and Tcl9
      
    16. type initialized to: "Bug"
  2. Ticket change [2f2280c288] (rid 209279) by jan.nijtmans on 2023-02-26 22:04:44:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      This change is explained in TIP #619:
      
      [https://core.tcl-lang.org/tips/doc/trunk/tip/619.md]
      
      Tcl 8.6/8.7 always combines surrogates when it encounters a pair. This is wrong, since it makes the "string length" inconsistant: Glueing two strings together with length 1 (an Upper and a Lower surrogate) results in a new string with length 1. Because Tcl 8.7 uses 3 different internal representations (UTF-8, UTF-16 and UTF-32), and can freely switch between them, there's no way to distinguish a surrogate-pair and a code-point > U+FFFF.
      
      In Tcl 9.0, Surrogates are never joined, so a round-trip between utf-8 -> utf-32 ->utf-8 is losless. That's the intention of TIP #619.
      
      See also [https://core.tcl-lang.org/tcl/tktview?name=0d61d3a2bb], which contains the discussion which lead to exactly this change.
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "Invalid"
    6. status changed to: "Pending"
  3. Ticket change [6b34fa074d] (rid 209288) by apnadkarni on 2023-02-27 09:49:15:

    1. icomment: "Ok, thanks. I'll adapt the test cases accordingly."
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  4. Ticket change [d22a7e3f05] (rid 209308) by jan.nijtmans on 2023-02-27 20:54:43:

    1. closedate changed to: "2460003.3713358"
    2. closer changed to: "jan.nijtmans"
    3. login: "jan.nijtmans"
    4. mimetype: "text/plain"
    5. status changed to: "Closed"