On 4/6/12, Reinier Olislagers <[email protected]> wrote:
> Hi all,
> (Example on Windows)
> OpenURL can be used to open a file on the local machine.
>
> The documentation
> http://lazarus-ccr.sourceforge.net/docs/lcl/lclintf/openurl.html
>
> says you need to have a valid URL like file://c:\test\bla.pdf
>
> If I have a path with spaces in it and try and open a pdf file, these
> arguments work:
> "file://c:\some path with spaces\some file.pdf"
> and
> c:\some path with spaces\some file.pdf
>
> This one doesn't:
> file://c:\some path with spaces\some file.pdf
> (It doesn't open the file, but ShellExecuteW that is called in OpenURL
> does return a success result code)

When you use the file:// (or any other) URI scheme, maybe you have to
use HTML-escape codes for spaces (and some other characters):
file://c:/some%20file%20with%spaces%20in%20the%20filename.pdf

Bart

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to