Tcl Source Code

Artifact [afe5a182f6]
Login
EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA

Artifact afe5a182f623c31030a49d8e08f58fccd513e37a7a94ef5de3e06a982c5cc01c:

Ticket change [afe5a182f6] - Ticket [8cae59ecb0] Eliminate "-encoding binary" in favour of "-translation binary" status still Open with 3 other changes by sebres 2024-06-20 10:58:15.
D 2024-06-20T10:58:15.168
J icomment There\sis\sindeed\sno\sencoding\sbinary,\sbut\sthe\schannel\smay\sbe\sbinary,\sso\swhy\sstill\snot\sconsider\sit\slike\sin\s8.x\sas\sbinary\sencoding?\r\nAnd\sa\ssetting\sthis\svia\stranslation\sis\sa\sbit\sdifferent\sto\sme:\sit'd\salso\schange\s`eofchar`\sand\s`translation`,\swhat\sis\scorrect\sfor\spure\sbinary\smode\sof\schannel,\showever\sif\sone\suses\ssomething\slike:\r\n```\r\nchan\sconfigure\s-encoding\sbinary\s-eofchar\s{}\r\n```\r\nthe\sexpectation\sis\srather\sthat\s`translation`\sremains\s`{auto\scrlf}`\sor\s`{auto\slf}`\s**depending\son\splatform.**\r\n\r\nSo\swhy\snot\sjust\s"revert"\sback\sto\sthe\s8.x\shandling\sfor\sconsistency\sand\sjust\saccept\spseudo\sencoding\sname\s`binary`\sfor\sbinary\smode\sretaining\stranslation\sas\sit\sis?\r\n\r\nLet\salone\siso8859-1\sis\snever\scomparable\swith\sbinary\smode,\sbecause\sone\sprefers\sstrings\sanother\sbytearrays\s(and\sfor\sexample\sstrictly\sseen\siso8859-1\shas\sto\sreject\sall\schars\s0x00-0x1F\sand\s0x7F-0x0F),\sso\sit\sis\sstill\smore\sconfused\sthen\s(and\sprevious\shandling\sof\s8.x.\sremaining\sbinary\sas\svalue\sis\smore\sconsistent).\r\n\r\nWhy\shaving\san\sartificial\sencoding\sname\s(what\sis\snot\sreally\san\sencoding\sjust\sa\smark\sfor\sbytearray\shandling)\sis\sso\sbad?\sTake\sa\slook\sat\s`unicode`\s-\sit\sis\salso\snot\sexisting\sencoding,\sbut\sjust\sa\smark\sfor\sunicode\shandling,\snothing\selse.\sBut\sthe\sname\sis\spretty\susable.\r\n\r\n<blockquote>>\sMany\speople\suse\s"-encoding\sbinary"\swhile\sthey\sreally\smean\s"-translation\sbinary".</blockquote>\r\n\r\nThis\sis\snot\san\sargument\sin\smy\sopinion:\r\n\r\n1.\sRTFM\r\n2.\sIn\scase\sof\s"backwards\scompatibility\svs.\stheoretical\spossibility\sfor\stypo"\swe\sshall\salways\sprefer\sthe\sfirst,\sbecause...\r\n3.\sIf\sone\swould\sconsider\sarguments\slike\sthat,\sthen\slet\sus\sforbid\severything\swhat\scan\sintroduce\sa\sconfusion\s(hardly\spossible\sin\sa\sscript-lang,\sespecially\sin\sthat\swith\sEIAS\smodel)\sand\signore\severy\scompat\squestion\sin\sthe\sfuture.\r\n\r\nSo\sI'd\sjust\sswitch\sback\sto\s8.x\shandling:\s`binary`\sis\svalid\svalue\sthat\scan\sbe\sset\swith\s`-encoding`\sparameter\ssimilar\sto\s`unicode`\s(which\sis\salso\sunknown\sencoding,\srather\sa\ssign\swe'll\swork\sinternally\swith\sunicode\sstring\sinstead).\r\nBut\sas\salready\ssaid,\sI'd\sreally\suse\s`binary`\sas\sreturn\svalue\s(instead\sof\siso8859-1)...\sagain,\ssimilar\sto\s8.x,\sto\sunicode\spseudo\sencoding,\sand\spretty\sbackwards\scompatible.
J login sebres
J mimetype text/x-markdown
K 8cae59ecb03a6269468379a1e028c01f604ce5de
U sebres
Z 7b45870e5510e4a851215dd90bc22adb