Skip to content
Tcl Source Code History Of Ticket 6b1c6bb09c4fc753
Login

History Of Ticket 6b1c6bb09c4fc753

Artifacts Associated With Ticket 6b1c6bb09c4fc753

  1. Ticket change [cd08992ed5] (rid 189313) by anonymous on 2020-11-28 15:03:46:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      When I compile Tcl from the core-8-branch (8.7) with configure option
      CFLAGS=-DTCL_UTF_MAX=4, the test below fails.  Note that this problem
      does not occur with the default TCL_UTF_MAX=3.
      
      >>>>>
      package require tcltest
      namespace import -force ::tcltest::*
      
      # hex s - Format the string S as a hex dump.
      proc hex {s} {
          lmap ch [split $s ""] {
              format "%02X" [scan $ch "%c"]
          }
      }
      
      #set catFaceCodepoint 0x1F639
      set catFaceUtf "\xF0\x9F\x98\xB9"
      set catFaceUtf16 "\x3D\xD8\x39\xDE"
      
      test encoding-bug-1 {encoding: extended Unicode UTF-16} {
          set tclstring [encoding convertfrom utf-8 $catFaceUtf]
      	set utf16 [encoding convertto unicode $tclstring]
      	hex $utf16
      } [hex $catFaceUtf16]
      <<<<<
      
    5. foundin initialized to: "8.7a4 (2020-11-28)"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "11198a4027193b80a694e66a04403b2c879b1f6f"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "44. UTF-8 Strings"
    15. title initialized to:
      Extended plane character does encode correctly to UTF-16 with TCL_UTF_MAX==4
      
    16. type initialized to: "Bug"
  2. Ticket change [ded508c68c] (rid 189314) by anonymous on 2020-11-28 15:04:17:

    1. login: "anonymous"
    2. mimetype: "text/plain"
    3. title changed to:
      Extended plane character does not encode correctly to UTF-16 with TCL_UTF_MAX==4
      
  3. Ticket change [7f5b199768] (rid 189315) by anonymous on 2020-11-28 15:04:57:

    1. comment changed to:
      When I compile Tcl from the core-8-branch (8.7) with configure option
      CFLAGS=-DTCL_UTF_MAX=4, the test below fails.  Note that this problem
      does not occur with the default TCL_UTF_MAX=3.
      
      >>>>>
      package require tcltest
      namespace import -force ::tcltest::*
      
      # hex s - Format the string S as a hex dump.
      proc hex {s} {
          lmap ch [split $s ""] {
              format "%02X" [scan $ch "%c"]
          }
      }
      
      #set catFaceCodepoint 0x1F639
      set catFaceUtf "\xF0\x9F\x98\xB9"
      set catFaceUtf16 "\x3D\xD8\x39\xDE"
      
      test encoding-bug-1 {encoding: extended Unicode UTF-16} {
          set tclstring [encoding convertfrom utf-8 $catFaceUtf]
          set utf16 [encoding convertto unicode $tclstring]
          hex $utf16
      } [hex $catFaceUtf16]
      <<<<<
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  4. Ticket change [b9fcb26428] (rid 189316) by anonymous on 2020-11-28 15:06:02:

    1. comment changed to:
      When I compile Tcl from the core-8-branch (8.7) with configure option
      CFLAGS=-DTCL_UTF_MAX=4, the test below fails.  Note that this problem
      does not occur with the default TCL_UTF_MAX=3.
      
      >>>>>
      package require tcltest
      namespace import -force ::tcltest::*
      
      # hex s - Format the string S as a hex dump.
      proc hex {s} {
          lmap ch [split $s ""] {
              format "%02X" [scan $ch "%c"]
          }
      }
      
      #set catFaceCodepoint 0x1F639
      set catFaceUtf8 "\xF0\x9F\x98\xB9"
      set catFaceUtf16 "\x3D\xD8\x39\xDE"
      
      test encoding-bug-1 {encoding: extended Unicode UTF-16} {
          set tclstring [encoding convertfrom utf-8 $catFaceUtf8]
          set utf16 [encoding convertto unicode $tclstring]
          hex $utf16
      } [hex $catFaceUtf16]
      <<<<<
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  5. Ticket change [1224088776] (rid 189355) by jan.nijtmans on 2020-11-30 12:21:16:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459184.01476855"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Thanks for the report and the test-case: This pointed - indeed - exactly to the problem. Fixed here: [ea91d44454d0a29b].
      
      There was another problem in big-endian encoding conversion: The lower surrogate was output before the higher surrogate, but that's not how surrogates work. Fixed that too!
      
      Thanks!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. severity changed to: "Severe"
    9. status changed to: "Closed"
  6. Ticket change [384dde679c] (rid 189667) by anonymous on 2020-12-05 16:46:02:

    1. closedate changed to: "2459189.19863721"
    2. closer changed to: "anonymous"
    3. icomment:
      Thanks, you fixed it faster than I could check it out ;-)  Works fine now.  Pleasure.
      
    4. login: "anonymous"
    5. mimetype: "text/plain"