From 2d8f75bb449a9a3fd3de32a2a8e009ce10a1709c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 15 Sep 2023 06:53:44 +0000 Subject: 3 places where TCLFSENCODING is not appropricate (use system-encoding, not utf-8, on Windows) --- generic/tclIOSock.c | 4 ++-- win/tclWinPipe.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c index 4b2c637..47fde36 100644 --- a/generic/tclIOSock.c +++ b/generic/tclIOSock.c @@ -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; } @@ -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; } diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index fd183cf..9f889b2 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -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); -- cgit v0.12