ASCII characters and variable substitution
Closed / Fixedd2ffcca163f4236a1da6d5e0e83482970aee5a20Created 12 years agoUpdated 12 years ago
Descriptionplain2014-11-22 15:30:15
Rule 8 (variable substitution) (from http://www.tcl.tk/man/tcl/TclCmd/Tcl.htm) contains the following sentence: "Letters and digits are only the standard ASCII ones (0-9, A-Z and a-z)." Testing it gives inconsistency: > set гав bark ; puts $гав bark > set переменная variable ; puts $переменная $переменная Also, see this comp.lang.tcl thread: https://groups.google.com/forum/#!topic/comp.lang.tcl/KR98Neqes7w
Referenced by4
cf704d28eaOpen ticket [408568ffff]: Variable substitution parsing limited to ASCII alphanumerics plus 5 other changes ticket2019-03-08 09:56:51576177cd54[d2ffcca163] Limit parsing results that are documented to accept only ASCII chars to actually follow that constraint. This requires not trusting isalnum(.) and isalpha(.) to deliver portable identical results. check-in2014-12-05 12:28:0102260e5f9f[d2ffcca163] Limit parsing results that are documented to accept only ASCII chars to actually follow that constraint. This requires not trusting isalnum(.) and isalpha(.) to deliver portable identical results. check-in2014-12-04 22:10:573a78d39be9New ticket [e711ffb458] TclIsLocalScalar() appears wrongheaded. ticket2014-11-26 20:08:15
dgpplain2014-11-25 21:24:39
See bug-d2ffcca163 branch for one fix.
dgpplain2014-11-25 21:32:49
Expression parser suffers from analogous problems:
% expr \u0433
invalid bareword "г"
in expression "г";
should be "$г" or "{г}" or "г(...)" or ...
% expr \u043f
invalid character "п"
in expression "п"
dgpplain2014-11-26 16:20:41
see also http://core.tcl.tk/tcl/tktview?name=1511357 http://core.tcl.tk/tcl/tktview?name=408568
dgpplain2014-11-26 17:01:46
expr parser now also fixed on the branch. ready for review.
dgpplain2014-12-04 12:46:18
Testing reveals trouble due to unreliable portability of isalnum(). Need to code our own test.
dgpplain2014-12-04 22:08:43
fixed for Tcl 8.5.18.
dgpplain2014-12-05 12:28:59
and also for 8.6.4
Log in (anonymous is fine) to add a comment.