D 2021-01-04T14:22:12.893 J assignee nobody J closer nobody J cmimetype text/plain J comment Sorry\sto\sbother\syou\sagain\sabout\sthe\ssame\sproblem.\s\sThe\sbug\r\nhttps://core.tcl-lang.org/tcl/tktview/6b1c6bb09c4fc75326b37f5c7dcdaa44c0a7b6a5\r\nalso\soccurs\swith\sTcl\s8.6\s(core-8-6-branch),\swhen\scompiled\r\nwith\sTCL_UTF_MAX==5.\s\s(I\shad\snot\sbeen\saware\sof\sthis\smode\r\nwhen\sI\sreported\sthis\sbug\sfor\s8.7\sbefore.)\r\n\r\nTo\srecap,\sthis\stest\sfails:\r\n\r\n>>>>>\r\npackage\srequire\stcltest\r\nnamespace\simport\s-force\s::tcltest::*\r\n\r\n#\shex\ss\s-\sFormat\sthe\sstring\sS\sas\sa\shex\sdump.\r\nproc\shex\s{s}\s{\r\n\s\s\s\slmap\sch\s[split\s$s\s""]\s{\r\n\s\s\s\s\s\s\s\sformat\s"%02X"\s[scan\s$ch\s"%c"]\r\n\s\s\s\s}\r\n}\r\n\r\n#set\scatFaceCodepoint\s0x1F639\r\nset\scatFaceUtf8\s"\\xF0\\x9F\\x98\\xB9"\r\nset\scatFaceUtf16\s"\\x3D\\xD8\\x39\\xDE"\r\n\r\ntest\sencoding-bug-1\s{encoding:\sextended\sUnicode\sUTF-16}\s{\r\n\s\s\s\sset\stclstring\s[encoding\sconvertfrom\sutf-8\s$catFaceUtf8]\r\n\s\s\s\sset\sutf16\s[encoding\sconvertto\sunicode\s$tclstring]\r\n\s\s\s\shex\s$utf16\r\n}\s[hex\s$catFaceUtf16]\r\n<<<<<\r\n\r\nThis\swas\sfixed\sin\snovember\sfor\s8.7\swith\r\nhttps://core.tcl-lang.org/tcl/info/ea91d44454d0a29b J foundin 8.6.11 J is_private 0 J login anonymous J priority 5\sMedium J private_contact 11198a4027193b80a694e66a04403b2c879b1f6f J resolution None J severity Minor J status Open J submitter anonymous J subsystem 44.\sUTF-8\sStrings J title Tcl\s8.6:\sExtended\splane\scharacter\sdoes\snot\sencode\scorrectly\sto\sUTF-16\swith\sTCL_UTF_MAX==5 J type Bug K c376607b22fc6e1322d7cbfb8cb664b3ea226fdd U anonymous Z 6dfcf975d33cd33716613a90e4b8fc8b