Skip to content

Commit

Permalink
3 places where TCLFSENCODING is not appropricate (use system-encoding…
Browse files Browse the repository at this point in the history
…, not utf-8, on Windows)
  • Loading branch information
jan.nijtmans committed Sep 15, 2023
1 parent dceedef commit 2d8f75b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions generic/tclIOSock.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ TclSockGetPort(
* Don't bother translating 'proto' to native.
*/

if (Tcl_UtfToExternalDStringEx(interp, TCLFSENCODING, string, -1, 0, &ds, NULL) != TCL_OK) {
if (Tcl_UtfToExternalDStringEx(interp, NULL, string, -1, 0, &ds, NULL) != TCL_OK) {
Tcl_DStringFree(&ds);
return TCL_ERROR;
}
Expand Down Expand Up @@ -188,7 +188,7 @@ TclCreateSocketAddress(
int result;

if (host != NULL) {
if (Tcl_UtfToExternalDStringEx(interp, TCLFSENCODING, host, -1, 0, &ds, NULL) != TCL_OK) {
if (Tcl_UtfToExternalDStringEx(interp, NULL, host, -1, 0, &ds, NULL) != TCL_OK) {
Tcl_DStringFree(&ds);
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion win/tclWinPipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ TclpCreateTempFile(
* Convert the contents from UTF to native encoding
*/

if (Tcl_UtfToExternalDStringEx(NULL, TCLFSENCODING, contents, TCL_INDEX_NONE, 0, &dstring, NULL) != TCL_OK) {
if (Tcl_UtfToExternalDStringEx(NULL, NULL, contents, TCL_INDEX_NONE, 0, &dstring, NULL) != TCL_OK) {
goto error;
}
native = Tcl_DStringValue(&dstring);
Expand Down

0 comments on commit 2d8f75b

Please sign in to comment.