Skip to content
Tcl Source Code Artifact [cd8fcfd3ad]
Login

Artifact [cd8fcfd3ad]

Artifact cd8fcfd3ad33fff21c2c2a62839b4fc96fd0ac79:

Ticket change [cd8fcfd3ad] - Ticket [983509ffffffffff|983509ffff] <i>Tcl_RegisterConfig ignores encoding failure</i> status still Open with 7 other changes by dgp on 2013-07-05 16:17:56.
D 2013-07-05T16:17:56.031
J assignee aku
J closer nobody
J comment Tcl_RegisterConfig()\sreceives\sa\s"valEncoding"\r\nargument\sthat\sspecifies\sthe\sencoding\sfor\r\nthe\sstring\svalues\sin\sthe\s"configuration"\stable\r\nof\svalues.\s\sThose\svalues\sare\scopied\sinto\r\na\sdictionary,\sconverting\sto\sUTF-encoding.\r\n\r\nProblem\sarises\swhen\r\nTcl_GetEncoding(NULL,\svalEncoding)\r\nreturns\sNULL\s--\sessentially\smeaning\sthe\r\nappropriate\s*.enc\sfile\sfor\sthat\sencoding\scould\r\nnot\sbe\sfound.\r\n\r\nIn\sthat\scircumstance,\sT_RC\signores\sthe\r\nencoding\sfailure,\sand\sgoes\sahead\san\r\nconverts\sthe\sconfig\svalues\saccording\r\nto\swhatever\sTcl\sthinks\sthe\ssystem\sencoding\r\nis\sat\sthe\smoment.\s\s\r\n\r\nSince\sT_GE()\sfailed,\swe\sknow\sthis\scannot\r\nbe\sthe\sright\sthing\s--\swe\sare\sdefinitely\sconverting\r\nbased\son\sthe\swrong\sencoding\s--\sand\sworse,\swe\r\ncan't\seven\spredict\swhat\swrong\sthing\sT_RC\r\nwill\sdo\sinstead.\r\n\r\nWhen\sthe\s"valEncoding"\scannot\sbe\sfound,\r\nno\sdata\sshould\sbe\scopied\sover\sto\sthe\r\ndictionary,\ssince\sit\scannot\sbe\sdone\scorrectly.\r\nWhether\s[pkgconfig]\sshould\salso\snot\sbe\sdefined,\r\nor\swhether\sit\sshould\sbe\sdefined\swith\sno\sdata,\r\nI'm\snot\ssure.
J icomment Checkins\s[341f682e08]\s(8.5)\sand\s[6189063c4d]\s(8.6,trunk)\r\nhave\sfixed\sthis\sbug\sby\sre-designing\sit\sout\sof\sexistence.\r\n\r\nNow\sthese\svalues\sare\sstored\sas\sbytes,\sand\sthe\sencoding\r\nname\sis\salso\sstored\sand\sinterpretation\sof\sthe\sbytes\saccording\r\nto\sthat\sencoding\sis\sdelayed\suntil\sthe\svalues\sare\sretrieved.\r\nAt\sthat\stime,\sit's\sat\sleast\slikelier\sthat\senough\sinitialization\r\nis\scomplete\sthat\sencoding\sconversion\swill\shappen\ssuccessfully.\r\nIf\snot,\sthe\serror\scan\sarise\sthen\srather\sthan\sduring\sinterp\screation.
J login dgp
J mimetype text/plain
J severity Minor
K 983509ffffffffffffffffffffffffffffffffff
U dgp
Z c2652c9708eb909703aebcfb5b4a0bb8