D 2023-02-18T15:30:04.362
J icomment Jan,\sit\sseems\sto\sme\sthat\syou\sjust\snot\sagree\swith\s[read]\sand\s[gets]\sshould\sraise\serror\sif\san\sencoding\serror\shappens\son\sthe\schannel\sto\sread\sfrom.\sOr\sin\sother\swords\syou\sthink\sthe\scurrent\simplementation\sis\sthe\sright\sway\sto\sdo\sthis\s(and\sthe\shanging\s[gets]\sis\sjust\sa\sbug\spending\sto\sbe\sfixed).\r\n\r\nSome\sfolks\s(including\sme)\sthink\s[read]\sand\s[gets]\sshould\srise\serror\sright\saway\son\sencoding\serror\son\sthe\schannel.\sIf\sI\sunderstood\scorrectly\smost\sif\snot\sall\sparticipants\son\sthe\sFebruary\sTcl\svideo\smeeting\sagrees\son\sthat.\s\r\n\r\nWe\sshould\sthen\sperhaps\stry\sto\sget\sagreement\son\shigh\slevel\sabout\sthat\squestion.\r\n\r\nOn\sthe\sformal\sside\sI\sthink\sthe\scurrent\strunk\sbehaviour\s(need\sdouble\sread\sto\sraise\serror\son\sencoding\serror)\sisn't\sdescribed\sclearly\sby\sany\sTIP.\sPlease\scorrect\sme,\sif\sI'm\swrong.\r\n\r\nThe\sdifference\sbetween\sthe\stwo\sapproaches\sis\smainly\sthe\sreporting\sof\sthe\sso\sfar\sdecoded\sdata\sfrom\sthe\schannel.\sThis\sis\sperhaps\sa\sbit\smore\sconvenient\sdone\swith\swhat\sis\scurrently\son\strunk.\sSome\sfolks\sin\sthe\svideo\smeeting\salso\sclaimed\sthat\sit\sis\simportant\sto\sget\sto\sthe\sdecoded\sdata\sup\sto\sthe\serror.\r\n\r\nWhile\sI\sagree\sthat\sthere\smust\sbe\sa\sway\sto\sget\sto\sthat\sdata\sfor/in\sspecial\scases\s(and\spooryoricks\sapproach\salso\sfullfill\sthat)\sI\sthink\sthat\sin\sthe\shuge\smajority\sof\scases\san\sencoding\serror\son\sthe\schannel\swill\sjust\sbe\shandled\sin\saborting\sthe\saction\sand\sto\snotice\sthe\suser\sabout\sthat.\r\n\r\nWhat\selse\swill\syou\sdo\swith\sincomplete\sinput\sdata,\sespecially\sbecause\sthe\sso\sfar\sdecoded\sdata\smay\seven\sbe\smis-interpreted\s(if\sthe\sread\sdata\sit\sin\sanother\sencoding\sthan\sexpected\sby\sthe\schannel)?\r\n\r\nSo\schanging\sthe\ssemantics\sof\sread/gets\sin\sa\sbit\ssurprising\sway\s(for\sTclers\sas\swell\sas\sprogrammers\sfamiliar\swith\sother\slangugages)\sfor\sa\sbit\smore\sconvenience\sin\srare\s/\sspecial\scases\sseems\swrong\sto\sme.
J login pointsman
J mimetype text/plain
K b8f575aa2398b0e44b5a037326b9d75037e2da4a
U pointsman
Z a52b96095623b6f509e5a59ac6a72572