From d273753223b504a1eb70d83aad730a74d1f95d9a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 18 Feb 2019 20:38:23 +0000 Subject: Don't use TclUniCharIsSpace() in command-line handling: the windows command-line is not aware of Unicode spaces, only ASCII ones. --- win/tclWinPipe.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 9095938..83bd26e 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -1571,16 +1571,13 @@ BuildCommandLine( if (arg[0] == '\0') { quote = CL_QUOTE; } else { - int count; - Tcl_UniChar ch; for (start = arg; *start != '\0' && (quote & (CL_ESCAPE|CL_QUOTE)) != (CL_ESCAPE|CL_QUOTE); - start += count + start++ ) { - count = Tcl_UtfToUniChar(start, &ch); - if (count > 1) continue; - if (Tcl_UniCharIsSpace(ch)) { + if (*start & 0x80) continue; + if (TclIsSpaceProc(*start)) { quote |= CL_QUOTE; /* quote only */ if (bspos) { /* if backslash found - escape & quote */ quote |= CL_ESCAPE; -- cgit v0.12