[Lazarus] Opening a file with spaces in the filename (again)
John
jszcmpr at netspace.net.au
Tue Mar 5 15:22:21 CET 2013
Hi List,
Using Laz 1.0.6, "included" fpc2.6.0 on win 7 - 32 bit:
I want to open a tiff file using what ever viewer the PC knows about
that can do it (it will be irfanview on the test PC). It seemed that
"OpenDocument" is the appropriate method. This works fine so long as
the path has no spaces, but OpenDocument calls OpenURL, and that
converts the spaces to %20 s - which is fine for browsers, but fails at
least for irfanview (and other programs (eg dir) from a command line).
Quoting the file name does not seem to make any difference - the %20 s
are still substituted.
I notice there was considerable discussion about this around bug 21659
about a year ago, but I could not work out what the outcome was.
Am I using the right approach, or is there a better way to do it ? Or
does this mean there is still a bug in OpenDocument ?
As far as I can remember, I have occasionally used OpenDocument to open
a file (as opposed to a URL), and it should not be limited only to
opening files in browsers.
thanks,
John Sunderland
More information about the Lazarus
mailing list