diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-18 20:38:23 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-18 20:38:23 (GMT) |
commit | d273753223b504a1eb70d83aad730a74d1f95d9a (patch) | |
tree | dbaaf5998742db48af5740505d870c676be7d342 /win | |
parent | 04ed7f99daa6ac1ca3e5a2903fc7c9325cd4d581 (diff) | |
download | tcl-d273753223b504a1eb70d83aad730a74d1f95d9a.zip tcl-d273753223b504a1eb70d83aad730a74d1f95d9a.tar.gz tcl-d273753223b504a1eb70d83aad730a74d1f95d9a.tar.bz2 |
Don't use TclUniCharIsSpace() in command-line handling: the windows command-line is not aware of Unicode spaces, only ASCII ones.
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinPipe.c | 9 |
1 files 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; |