.
D 2023-02-21T08:36:45.381
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment Example:\r\n\r\n<pre>\r\n%\sencoding\sconvertfrom\sutf-16le\s\\x41\\x00\\x41\r\nA\r\n</pre>\r\n\r\nIn\sTcl\s8.7,\swe\ssee\swhat's\shappening\swhen\susing\s-strict\r\n<pre>\r\n%\sencoding\sconvertfrom\s-strict\sutf-16le\s\\x41\\x00\\x00\r\nunexpected\sbyte\ssequence\sstarting\sat\sindex\s2:\s'\\x0'\r\n</pre>\r\n\r\nBut\sin\sTcl\s8.6\swe\sdon't\shave\s-strict,\sand\sthe\sbyte\sis\ssilently\signored.\sThat's\snot\sgood.\r\n\r\nMany\sencodings\seither\soutput\sthe\sremaining\sbytes\sas-is\sor\sthe\sreplacement\scharacter\s\\xFFFD.\sFor\sUTF-16/32\soutputting\sthe\sremaining\sbytes\s(which\seasily\scould\sbe\s\\x00)\sdoesn't\smake\smuch\ssense.\sSo\smost\slogical\swould\sbe\sto\soutput\sthe\sreplacement\scharacter\sin\sthis\scase\s(just\sone).
J foundin 8.6
J is_private 0
J login jan.nijtmans
J priority 5\sMedium
J private_contact 0c50e5320704d174412e57b873d8932de15303e0
J resolution None
J severity Minor
J status Open
J submitter jan.nijtmans
J subsystem -\sNew\sBuiltin\sCommands
J title Handling\sincomplete\sbyte\ssequences\sfor\sutf-16/utf-32
J type Bug
K d19fe0a5bf54c97217eaba4b28a2c80cf4d16c13
U jan.nijtmans
Z 31ebbf15556185fc8df4c1fb8ce0413b