Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7e739b04f14dadf56b3767d0d19fd206dd239c5c50619c1292dacb5848573912
Ticket: e778e3f804cacd70deefcdf5ed5d1f8921f32ab1
Parsing of "profile" for TIP #656
User & Date: jan.nijtmans on 2023-02-28 16:06:40
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed 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.
    
  5. foundin changed to: "tip-656"
  6. is_private changed to: "0"
  7. login: "jan.nijtmans"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0c50e5320704d174412e57b873d8932de15303e0"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "jan.nijtmans"
  14. subsystem changed to: "16. Commands A-H"
  15. title changed to: "Parsing of "profile" for TIP #656"
  16. type changed to: "Bug"