.
D 2000-10-26T00:55:56
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3669\sBug\nVersion:\s8.2.2\nSubmitDate:\s'1999-11-23'\nLastModified:\s'2000-03-30'\nSeverity:\sLOW\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sBSD\nOSVersion:\stcl8.2.2\nMachine:\sFreeBSD-3.3\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-03-30'\n\n\nName:\nTaguchi\sTakeshi\n\nExtensions:\nplus\spatch\sfor\sTcl8.2.2\n\nCustomShell:\nI've\smade\sa\stcl\sextension\swhich\sdetermin\sJapanize\sencoding\s(detection\sengine\scome\sfrom\sSRA's\sJapanized\n\nComments:\ni18n\sfunctions\sin\stcl8.2\sis\snot\sgood\senough.\nBut\ssupporting\sit\sis\sa\sgood\snews\sfor\sus.\nPlease\senhancement\sit.\n\nReproducibleScript:\n#\sIn\sthe\sfollowing\sexample,\sfile\skanji.jis\sis\sa\sfile\swhich\sencoding\sis\siso2022-jp.\n#\sbut\sI\swant\sto\sread\sas\s"binary\sstring",\sand\sI\swant\sto\sanalyze\swhich\sencoding\sit\sis,\sand\n#\sconvert\sto\ssystem\sencoding\smanualy.\sbut\s......\nset\sfp\s[open\s"kanji.jis"]\nfconfigure\s$fp\s-encoding\sbinary\nset\sline\s[read\s$fp]\ncatch\s[list\sclose\s$fp]\n\neval\s"set\sstr\s$line"\s;\s#\s<-\sproduce\serror!\n\nDesiredBehavior:\nI\sthink\s\n\s\s\s\s\seval\s$str\nwill\sbe\serror.\sstr\scontain\ssomething\smultibyte\sstring,\snot\ssystem\sencoding.\n\nThis\smeans\sall\sprogrammer\sand\suser\smust\sknow\sscript\sand\sits\sinput/output\sencoding\sbefor\nevaluation.\n\nBut\sit\sis\snot\sgood.\nImagin\sinternet\sapplications.\sthe\sInternet\sis\sworld\swide.\sso\sprogrammer\scan\snot\sdetermin\nuser's\sencoding\sbefor\sevaluation.\n\n\n\nI'm\snot\squite\ssure\sthat\sthe\sabove\sis\san\serror.\s\sThe\suser\sisn't\nproperly\sprotecting\sthe\svalues\sagainst\swhitespace,\sas\sthe\nfollowing\sexample\sshows:\n\n(tkcon)\s49\s%\sset\sline\s"a\sspace\shere"\na\sspace\shere\n(tkcon)\s50\s%\seval\s"set\sstr\s$line"\nwrong\s#\sargs:\sshould\sbe\s"set\svarName\s?newValue?"\n(tkcon)\s51\s%\seval\s[list\sset\sstr\s$line]\na\sspace\shere\n\s\n--\s03/30/2000\shobbs
J foundin obsolete:\s8.2.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 57.\szlib
J title tcl\scan\snot\seval\smultibyte\sstrings
J type Bug
K 218305ffffffffffffffffffffffffffffffffff
U nobody
Z 6398fb3a3b69ba195afda563714304b8