Skip to content
Tcl Source Code Artifact [68bde393d2]
Login

Artifact [68bde393d2]

Artifact 68bde393d2c3ee6b27df65e65a020ea3cb87cca6:

Ticket change [68bde393d2] - New ticket [3312630fffffffff|3312630fff] <i>drivers lack controls over encodings</i>. by dgp on 2011-06-06 18:06:27.
D 2011-06-06T18:06:27
J assignee andreas_kupries
J cmimetype text/plain
J comment The\stypical\sTcl_Channel\smay\scode\sinto\sits\nTcl_DriverOutputProc()\san\sassumption\sthat\nthe\sbytes\scoming\sin\sare\sin\sa\sparticular\nencoding.\s\sSuch\sa\schannel\stype\swill\stypically\ninclude\sin\sits\schannel\screation\scommand\nafter\sa\scall\sto\sTcl_CreateChannel()\sanother\ncall\sto\sTcl_SetOption()\sto\sset\sthe\sinitial\ndefault\sencoding\sof\sthe\schannel\sto\swhat\sit\nexpects.\n\nHowever,\sthe\sTcl_Channel\ssystem\sgive\sthe\ndriver\sno\spower\sto\soverride,\srefuse,\sor\nprevent\sa\s[chan\sconfigure]\sor\sequivalent\sto\nset\sthe\sencoding\sof\sthe\schannel\sto\sa\snew\svalue,\none\sinconsistent\swith\sthe\sassumptions\sof\sthe\nOutputProc.\s\sThe\spublic\sroutines\snecessary\sto\nworkaround\sthis\spossible\smismatch\swithin\s\nthe\sOutputProc\s(read\sthe\scurrent\sencoding\ssetting\nand\sconvert\sto\swhat's\sneeded\sif\sneeded)\sare\nweak,\sand\sthe\sresulting\serror\sprevention\nstanzas\sare\ssomething\severy\sOutputProc\sconcerned\nabout\sthis\sissue\swould\sneed\sto\sclumsily\sreproduce.\n\nWhile\sthese\sfacts\sremain\strue,\sthe\simplied\sposition\sof\nTcl\son\schannel\sencodings\sis\sthat\sanyone\susing\n[chan\sconfigure]\sto\sset\san\sencoding\stakes\sresponsibility\nfor\sany\sbreakage\sinduced.\n\nWhenever\san\sopportunity\sarises\sto\sconsider\sthe\snext\nversion\sof\sthe\sTcl_Channel\sdriver\sinterface,\ssome\npossible\simprovements\sto\sdeal\swith\sthis\swould\sbe:\n\n1)\sRoutinely\spass\sin\sthe\sTcl_Channel\sto\sdriver\sroutines,\n\s\s\s\srather\sthan\sexpect\severy\sdriver\sto\sstick\sa\sfield\sfor\sit\n\s\s\s\sinto\sits\sClientData.\n\n2)\sA\sroutine\staking\sa\sTcl_Channel\sthat\sreturns\sthe\n\s\s\s\sTcl_Encoding(s)\scurrently\sin\suse\son\sthat\schannel\n\s\s\s\swithout\sthe\sneed\sfor\sthe\scaller\sto\sdo\sthe\sugly\sstring\n\s\s\s\stranslations,\slifetime\smanagement,\setc,\sfor\sitself.\n\n3)\sA\smeans\sby\swhich\sa\sdriver\scould\srefuse\san\sencoding\n\s\s\s\schange.
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 25.\sChannel\sSystem
J title drivers\slack\scontrols\sover\sencodings
J type RFE
K 3312630fffffffffffffffffffffffffffffffff
U dgp
Z 130cf4e61a10aa96a44d1f309b7902d2