Artifacts Associated With Ticket 6b1c6bb09c
Ticket change [cd08992ed5] (rid 189313) by anonymous on 2020-11-28 15:03:46:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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] <<<<< - foundin initialized to: "8.7a4 (2020-11-28)"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- private_contact initialized to: "11198a4027193b80a694e66a04403b2c879b1f6f"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "44. UTF-8 Strings"
- title initialized to:
Extended plane character does encode correctly to UTF-16 with TCL_UTF_MAX==4
- type initialized to: "Bug"
Ticket change [ded508c68c] (rid 189314) by anonymous on 2020-11-28 15:04:17:
- login: "anonymous"
- mimetype: "text/plain"
- title changed to:
Extended plane character does not encode correctly to UTF-16 with TCL_UTF_MAX==4
Ticket change [7f5b199768] (rid 189315) by anonymous on 2020-11-28 15:04:57:
- 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] <<<<< - login: "anonymous"
- mimetype: "text/plain"
- comment changed to:
Ticket change [b9fcb26428] (rid 189316) by anonymous on 2020-11-28 15:06:02:
- 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] <<<<< - login: "anonymous"
- mimetype: "text/plain"
- comment changed to:
Ticket change [1224088776] (rid 189355) by jan.nijtmans on 2020-11-30 12:21:16:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2459184.01476855"
- closer changed to: "jan.nijtmans"
- 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!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- severity changed to: "Severe"
- status changed to: "Closed"
Ticket change [384dde679c] (rid 189667) by anonymous on 2020-12-05 16:46:02:
- closedate changed to: "2459189.19863721"
- closer changed to: "anonymous"
- icomment:
Thanks, you fixed it faster than I could check it out ;-) Works fine now. Pleasure.
- login: "anonymous"
- mimetype: "text/plain"