Artifacts Associated With Ticket e778e3f804cacd70
Ticket change [7e739b04f1] (rid 209367) by jan.nijtmans on 2023-02-28 16:06:40:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
Some examples: <pre> % fconfigure stdin -encodingprofile xx bad profile "xx". Must be "tcl8" or "strict". % fconfigure stdin -translation xx bad value for -translation: must be one of auto, binary, cr, lf, crlf, or platform </pre> Looking at consistancy, I would expect "bad value for -encodingprofile: must be one of replace, strict, or tcl8". "replace" was missing, and options should be alphabetical. Same for "encoding convertfrom/convertto" <pre> % encoding convertfrom -profile xx ascii é bad profile "xx". Must be "tcl8" or "strict". </pre> Looking at the implementation, there's a special function `TclEncodingProfileNameToId()` which does the parsing. Suggestion, use the standard Tcl function `Tcl_GetIndexFromObjStruct()` in stead, wherever possible. This function handles all those minor details. - foundin initialized to: "tip-656"
- is_private initialized to: "0"
- login: "jan.nijtmans"
- priority initialized to: "5 Medium"
- private_contact initialized to: "0c50e5320704d174412e57b873d8932de15303e0"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "jan.nijtmans"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "Parsing of "profile" for TIP #656"
- type initialized to: "Bug"
Ticket change [dea4ef226d] (rid 209372) by jan.nijtmans on 2023-02-28 16:11:20:
- icomment:
Another advantage of using `Tcl_GetIndexFromObjStruct()`: The Tcl_Obj is converted to an "index" objType, which cashes the internal id. Proposed fix: [82377ce539f52131|here]
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [649791577d] (rid 209373) by jan.nijtmans on 2023-02-28 16:14:59:
- assignee changed to: "apnadkarni"
- login: "jan.nijtmans"
- mimetype: "text/plain"
Ticket change [e0f953f179] (rid 209374) by apnadkarni on 2023-02-28 16:57:09:
- icomment:
I'll fix the missing "replace" and alphabetical order. I didn't use Tcl_GetIndexFromObjStruct specifically because it cannot be used from the configure which only has a string and not a Tcl_Obj. Allocating a Tcl_Obj just to call Tcl_GetIndexFromObjStruct did not seem like a good trade-off. I was not in favour of using Tcl_GetIndexFromObjStruct in one place and then using an inline loop (much less readable imo) in the configure code as you have done for essentially the same function. I much prefer code for a specific purpose to be encapsulated into a single function. Thanks for the feedback. /Ashok
- login: "apnadkarni"
- mimetype: "text/plain"
- icomment:
Ticket change [a6ba5598e2] (rid 209451) by apnadkarni on 2023-03-02 06:56:26:
- closedate changed to: "2460005.78919906"
- closer changed to: "apnadkarni"
- icomment:
Fixed in [f9e3e55bb8] and [80abdf9c7d] respectively for tip-656 and tip-656-tcl9
- login: "apnadkarni"
- mimetype: "text/x-fossil-plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"