Skip to content

Commit

Permalink
Set the encoding profile to strict in Tcl_FSEvalFileEx(). This is ind…
Browse files Browse the repository at this point in the history
…ependent

of TIP 657:  A script to be evaluated must be properly encoded in any case.
  • Loading branch information
pooryorick committed Apr 23, 2023
1 parent ce214e9 commit a62d037
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions generic/tclIOUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,11 @@ Tcl_FSEvalFileEx(
Tcl_CloseEx(interp,chan,0);
return result;
}
if (Tcl_SetChannelOption(interp, chan, "-profile", "strict")
!= TCL_OK) {
Tcl_CloseEx(interp,chan,0);
return result;
}

TclNewObj(objPtr);
Tcl_IncrRefCount(objPtr);
Expand Down

0 comments on commit a62d037

Please sign in to comment.