Overview
| Artifact ID: | fca0e2affe12a42c7302b68bea353627de95ad80485bcc3ed8f985b8d30f0fb6 |
|---|---|
| Ticket: | c376607b22fc6e1322d7cbfb8cb664b3ea226fdd
Tcl 8.6: Extended plane character does not encode correctly to UTF-16 with TCL_UTF_MAX==5 |
| User & Date: | anonymous on 2021-01-04 14:22:12 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Sorry to bother you again about the same problem. The bug https://core.tcl-lang.org/tcl/tktview/6b1c6bb09c4fc75326b37f5c7dcdaa44c0a7b6a5 also occurs with Tcl 8.6 (core-8-6-branch), when compiled with TCL_UTF_MAX==5. (I had not been aware of this mode when I reported this bug for 8.7 before.) To recap, this test fails: >>>>> 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] <<<<< This was fixed in november for 8.7 with https://core.tcl-lang.org/tcl/info/ea91d44454d0a29b - foundin changed to: "8.6.11"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "11198a4027193b80a694e66a04403b2c879b1f6f"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "44. UTF-8 Strings"
- title changed to:
Tcl 8.6: Extended plane character does not encode correctly to UTF-16 with TCL_UTF_MAX==5
- type changed to: "Bug"