Bug 195909 - Opening file with name containing hash (#) fails
Summary: Opening file with name containing hash (#) fails
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 198564 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-10 17:48 UTC by Jörg Afflerbach
Modified: 2009-07-06 20:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Afflerbach 2009-06-10 17:48:17 UTC
Version:           0.8.80 (using 4.2.90 (KDE 4.2.90 (KDE 4.3 Beta2)) "release 139", KDE:KDE4:Factory:Desktop / openSUSE_11.0)
Compiler:          gcc
OS:                Linux (i686) release 2.6.25.20-0.1-pae

Okular fails to open files which have a hashmark (#) in their name. 
How to reproduce: In an xterm type

$ okular chapter#11.pdf

where chapter#11.pdf is an existing PDF file.

Okular opens with the error message
"file:///home/joe/chapter kann nicht geöffnet werden."
translated "Can not open file:///home/joe/chapter"

Okular seems to load the file using an URI, where # denotes the fragment. So I guess the hashmark should be URL-encoded here.


$ konqueror chapter#11.pdf 

works as expected by the way
Comment 1 Pino Toscano 2009-07-02 10:11:15 UTC
*** Bug 198564 has been marked as a duplicate of this bug. ***
Comment 2 Pino Toscano 2009-07-06 20:35:40 UTC
SVN commit 992393 by pino:

reencode the url from the argument, 'file:/' at the start (for local files)
then, do few checks to better strip the correct "ref" from other '#' in the path
BUG: 195909


 M  +8 -3      shell.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=992393
Comment 3 Pino Toscano 2009-07-06 20:58:29 UTC
SVN commit 992398 by pino:

backport: reencode the url from the argument, 'file:/' at the start (for local files)
then, do few checks to better strip the correct "ref" from other '#' in the path
will be in kde 4.3.0
CCBUG: 195909


 M  +8 -3      shell.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=992398