% exec cmd /c echo "
\"
% exec cmd /c echo a="b"
a=\"b\"
double quotes are getting a literal backslash placed
in front of it. This isn't a blind pass-through. The
attached patch seems to fix this. It needs more
testing.
% exec cmd /c echo a="b"
a="b"
% exec cmd /c echo "b"
b
% exec cmd /c echo "b a"
"b a"
% exec cmd /c echo a="b"as
a="b"as
% exec cmd /c echo \\
\
% exec cmd /c echo \\\\
\\
% exec cmd /c echo {\\\\}
\\\\
% exec cmd /c echo {\\}
\\
changes to win/tclAppInit.c
Logged In: YES
user_id=7549
Just added my thoughts on setargv() from win/tclAppInit.c
I changed it to grab the unicode command line and convert
it down to oem. This partialy addresses the i18n bug, but
Tcl_Main() still wants a dirty argv instead of clean utf-8,
so this change doesn't do anything useful.
GetCommandLineW() is supported on *ALL* Win32 platforms!
Logged In: YES
user_id=7549
running the output of BuildCommandLine thru setargv() I'm
getting this error:
% test_passthru {a"b} {cd fg}
{ab cd} fg
%
If I change the logic to output the following:
% test_buildcmdline {a"b} {cd fg}
"a""b" "cd fg"
% test_passthru {a"b} {cd fg}
a\"b {cd fg}
% exec cmd /c echo {a"b} {cd fg}
a\"b "cd fg"
%
It essentially is still wrong calling an external process...
much thought required for this issue.
Logged In: YES
user_id=7549
The previous example of calling [exec] was flawed! please
ignore my error.
Logged In: YES
user_id=7549
I'm all confused about this. please test.
Logged In: YES
user_id=72656
why are these changes in tclAppInit.c expected to effected
the command line process " handling? Or are both patches
expected to be added?
Logged In: YES
user_id=7549
You can forget the tclAppInit.c change. That's me trying to
fix the unicode bug. As Tcl_Main expects a dirty argv[], one
can't send it unicode anyways. Not even if
GetCommandLineW is supported on all Win32 OSes. Which
it is, oddly enough.
Maybe we could split Tcl_Main into two commands where
Tcl_Main does the native conversion up to unicode then calls
(maybe) Tcl_MainUni that does all the work as before but argv
[] is an array of Tcl_UniChar pointers (??)
Yeah, this has nothing to do with the quote bug, though.
Logged In: YES
user_id=7549
This is bogus...