.
D 2022-12-22T13:27:22.931
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment package\srequire\sTcl\s9\r\n\r\n#\sCreate\sthe\stest\sdata\r\nset\sfd\s[open\s"data.txt"\sw+]\r\nfconfigure\s$fd\s-encoding\sbinary\r\n#\sNot\svalid\sUTF-8\r\nputs\s$fd\sAB\\xc0\\x40CD\\nEFG\r\nclose\s$fd\r\n\r\nset\sin\s[open\s"data.txt"]\r\nset\sout\s[open\s"copy.txt"\sw+]\r\nfconfigure\s$in\s-encoding\sutf-8\s-strictencoding\s1\r\nfconfigure\s$out\s-encoding\sutf-8\s-strictencoding\s1\r\nfcopy\s$in\s$out\r\n\r\nAgain\sI'm\snot\ssure\show\sthis\sis\ssupposed\sto\swork\r\nbut\sthe\sresult\sdid\ssurprise\sme.\r\n\r\nThe\sscript\sruns\sto\sits\send\swithout\sany\serror.\r\nThe\screated\sfile\s"copy.txt"\sis\sbyte\sindentical\swith\r\n"data.txt".\r\n\r\nNeither\sthe\s-strictencoding\s1\son\sthe\sin\schannel\r\nnor\sthe\s-strictencoding\s1\son\sthe\sout\schannel\sseem\r\nto\sdo\sanything,\sif\sthe\schannels\sare\sused\swith\sfcopy.\r\n\r\nAt\sminimum\sthis\sshould\sbe\snoted\seither\sin\sthe\sfcopy\r\nor\sthe\sfconfigure\sdocumentation\s(I\slooked\sbut\sdidn't\r\nfound\ssomething\sabout\sthis\scase\satm).\r\n\r\nBetter,\sI\sthink,\swould\smaybe\srasing\serror\son\sthe\sfcopy.\r\nBut\sas\swritten\sI'm\snot\ssure\show\sthis\sis\ssupposed\sto\swork.
J foundin Tcl\s9,\strunk
J is_private 0
J login pointsman
J priority 5\sMedium
J private_contact 4ca203a8e925aecdd9419645f936bccf18cd6ea7
J resolution None
J severity Important
J status Open
J submitter pointsman
J subsystem 25.\sChannel\sSystem
J title Tcl\s9:\sfcopy\swith\s-strictencoding\s1\sUTF-8\schannels
J type Bug
K 4a7397e0b3d60f1aebf50331b748da9493dba07d
U pointsman
Z 0d3520491e436f45c42411b4441caa60