History Of Ticket 869df60efcf1ed8e8856b6b43fbd29084cf989be

Artifacts Associated With Ticket 869df60efcf1ed8e8856b6b43fbd29084cf989be

  1. Ticket change [4d26ec9f45] (rid 4397) by bandoti on 2026-11-01 10:36:27:

    1. foundin initialized to: "2.0.1"
    2. icomment:
      Tcl 9 removed the "binary" encoding alias, so setting it fails and the channel
      keeps the system encoding. A CA file with non-ASCII bytes then comes back
      corrupted under any system encoding other than iso8859-1. Read it with
      -translation binary, which Tcl 8.6 and 9 both accept, and stop if that fails.
      
      diff -ruN A/generic/tls.c B/generic/tls.c
      --- A/generic/tls.c
      +++ B/generic/tls.c
      @@ -1908,7 +1908,10 @@
           if (in == NULL) {
       	goto cleanup;
           }
      -    Tcl_SetChannelOption(interp, in, "-encoding", "binary");
      +    if (Tcl_SetChannelOption(interp, in, "-translation", "binary") != TCL_OK) {
      +	Tcl_Close(interp, in);
      +	goto cleanup;
      +    }
           buf = Tcl_NewObj();
           Tcl_IncrRefCount(buf);
      
    3. login: "bandoti"
    4. mimetype: "text/plain"
    5. priority initialized to: "Medium"
    6. private_contact initialized to: "e6a07be3001c236f35faa93e53f095fc289ddb44"
    7. severity initialized to: "Important"
    8. status initialized to: "Open"
    9. title initialized to:
      CA files loaded from a VFS fail under a non-Latin-1 locale on Tcl 9 because -encoding binary is no longer valid.
      
    10. type initialized to: "Code Defect"