[Lazarus] Problem with TProcessUTF8 and filenames with spaces
Michael Van Canneyt
michael at freepascal.org
Sat Dec 8 17:07:57 CET 2012
On Sat, 8 Dec 2012, zeljko wrote:
>> You mention TProcessUTF8, that is a complicating factor.
>> You then need to see (using strace) what the calling app actually sends.
>> I suspect the problem is there.
>>
>> Are you using the new 'parameters' or still the old 'CommandLine' ?
>> If the latter, then it is a safe bet that the problem is there.
>
> I'm using what TCustomApplication offers: HasOption and GetOptionValue.
> TProcessUTF8 isn't guilty here definitelly since I'm calling my utility from
> application with it, but my utility in console returns bad results, so
> something with TCustomApplication could be.
I called my app from the console and all worked fine.
TCustomApplication has no special treatment of spaces, it doesn't need that.
It just uses what it gets from the OS.
> Besides that I'm not using only
> one param, it's combination of short and long params. Only problem is param
> with spaces.
Well, according to my tests, TCustomApplication works fine as you can see
from the output I posted. I use TCustomApplication, and often have spaces
in the arguments. Never had a problem, so I do not believe the issue is there.
Please post the output (by the tool) of
For I:=0 to ParamCount do
Writeln(Paramstr(i));
This will shed some light on the issue.
Michael.
More information about the Lazarus
mailing list