: <i>Eliminate "-encoding binary" in favour of "-translation binary"</i> plus 6 other changes
by
.
D 2024-07-01T21:20:36.180
J closedate 2460493.38930764
J closer jan.nijtmans
J icomment TIP\s#699\sis\saccepted\snow,\sthere's\sno\s"-encoding\sbinary"\sany\smore.\r\n\r\n@sebres\ssuggested\sto\schange\s"-encoding\sbinary"\sto\sfunction\sthe\ssame\sas\s"-translation\sbinary":\ssetting\sthe\s-translation\sto\slf\sand\s-eofchar\sto\s{}\sat\sthe\ssame\stime.\sThe\sproblem\sI\ssee\swith\sthis\ssuggestion\sis\sthat\sextensions\scan\ssilently\sbreak.\sThe\sfollwing\suse-case:\r\n\r\nA\schannel\sis\sbeing\sread.\sIn\sthe\smiddle,\ssomething\shappens\s(like\san\sencoding\serror).\sThe\sapplication\swants\sto\ssee\swhat\shappens,\sso\sthe\s-encoding\sis\schanged\sto\s"binary"\s(while\sthe\soriginal\sencoding\sis\sstored\sin\sa\svariable).\sA\sfew\smore\sbytes\sare\sread.\sThen\sthe\sencoding\sis\srestored.\r\n\r\nIf\swe\sfollow\s@sebres'\ssuggestion,\ssetting\s-encoding\sto\s"binary"\swill\salso\sset\sthe\s-eofchar\sand\s-translation.\sIf\sthe\schannel\swas\sin\scrlf\stranslation\smode,\sthen\sit\swon't\sbe\srestored\sany\smore:\sthe\sresulting\stranslation\sis\schanged\sto\slf.\r\n\r\nThe\scurrent\ssolution\sin\sTIP\s#699\smeans\sthat\sthe\scode\sneeds\sto\schange:\sYou\scan\sno\slonger\sset\sa\schannel\sto\s-encoding\s"binary",\sjust\suse\s-encoding\siso8859-1\sin\sstead\s(which\sdoes\sexactly\sthe\ssame\shere).\r\n\r\nHope\sthis\shelps
J login jan.nijtmans
J mimetype text/x-fossil-wiki
J resolution Fixed
J status Closed
K 8cae59ecb03a6269468379a1e028c01f604ce5de
U jan.nijtmans
Z 40a102adbaf16f626a679550785a524a