[fpc-devel] Another bug with spaces in fpc (windows)
Michael Van Canneyt
michael at freepascal.org
Tue Jul 6 15:17:06 CEST 2010
On Tue, 6 Jul 2010, Paul Ishenin wrote:
> 06.07.2010 21:01, Michael Van Canneyt wrote:
>> No, different shells is more likely to be the cause.
> I made a small bat file:
> @echo off
> echo 1 %1
> echo 2 %2
> C:\>test -o"My Test Project.exe" C:\WINDOWS\TEMP\project1.lpr
> 1 -o"My Test Project.exe"
> 2 C:\WINDOWS\TEMP\project1.lpr
> So quotes are passed right.
This is not bulletproof;
Windows cmd may do the handling for the batch interpreter.
Do not use a batch file, but a plain executable to test:
i : integer;
For I:=1 to ParamCount do
Writeln(I,' : ',Paramstr(i));
and test then with
mytest -o"My Test Project.exe" C:\WINDOWS\TEMP\project1.lpr
Only then we'll know who does the interpreting of the quotes.
In case it still differs, this doesn't explain why Marco's example works fine.
He seems to be using the same executable. Maybe different windows versions
handle it differently...
More information about the fpc-devel