summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-18 20:38:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-18 20:38:23 (GMT)
commitd273753223b504a1eb70d83aad730a74d1f95d9a (patch)
treedbaaf5998742db48af5740505d870c676be7d342 /win
parent04ed7f99daa6ac1ca3e5a2903fc7c9325cd4d581 (diff)
downloadtcl-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.c9
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;