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)
commit6f8ca6cd37425762bd671019d2f8ca28998d810f (patch)
treedbaaf5998742db48af5740505d870c676be7d342 /win
parent74126158ce8d80eb7ca620c6112ce29e5de40d4e (diff)
downloadtcl-6f8ca6cd37425762bd671019d2f8ca28998d810f.zip
tcl-6f8ca6cd37425762bd671019d2f8ca28998d810f.tar.gz
tcl-6f8ca6cd37425762bd671019d2f8ca28998d810f.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;