- Daryl Foster
- PowerBuilder
- Wednesday, 19 January 2022 05:40 AM UTC
Hi, I'm having a small issue with the browser control in PB2019R3 (Build 2728). I think it might be a bug, but wanted to check if there is any way around it.
We use the browser control to display local files, so we navigate using a windows filepath. If the filename contains a # character the file isn't found.
E.g. If I use this command:
wb_browser.Navigate('C:\temp\Invoice#1.pdf')
The browser control displays the error:
Page failed to load.
URL:file:///C:/temp/Invoice#1.pdf
Error: File not found. (-6)
If I do a similar thing in Chrome (or Edge or Firefox) and navigate to a local filepath, it will automatically urlencode it and use the file:// protocol. Is the browser control able to do a similar thing?
e.g. at the moment I navigate to
C:\temp\Invoice#1.pdf
and the browser control tries (and fails) to display
But if I do the same thing from Chrome the browser will display
file:///C:/temp/Invoice%231.pdf
i.e. it urlencodes the # character in the filepath.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.