Bug 236967 - PDF links broken when filepath or filename contains spaces or accented chars
Summary: PDF links broken when filepath or filename contains spaces or accented chars
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-09 11:27 UTC by Valentin Villenave
Modified: 2010-05-23 22:44 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Villenave 2010-05-09 11:27:20 UTC
Version:           0.10.02 (using Devel)
OS:                Linux
Installed from:    Compiled sources

Greetings,

I looked for a duplicate but couldn't find any; please close if this has already been reported!

Long story short: external links to a local file are broken in Okular if the filepath contains accented characters.

Long story long:
GNU LilyPond is a music notation software that generates PDF music scores from a text file written in a specific syntax. The generated PDFs contain specific links, so that by clicking on any object (note, etc.) in Okular, a text editor is opened with the cursor at the exact corresponding point of the source code.
For example, the Frescobaldi editor regroups a Katepart and an Okular component in the same window; clicking on any note of the PDF places the cursor to the appropriate location in the source code (see http://frescobaldi.org/screenshots ).

This is handled with textedit:// links to the (local) source file. These links are UTF-8 encoded (and spaces are encoded as %20), however Okular is unable to decode accented chars and spaces.

For instance, have a look at the attached PDF on Frescobaldi's bug tracker: http://code.google.com/p/lilykde/issues/detail?id=33
Comment 1 Pino Toscano 2010-05-22 20:14:47 UTC
The PDF document provided in the lilykde bug report has just one link at the bottom (pointing to http://lilypond.org/web/), and no textedit:// links.
Comment 2 Valentin Villenave 2010-05-23 12:51:57 UTC
Indeed. Sorry for the noise, I have updated the PDF on the lilykde bug tracker.

Thanks for noticing!
Comment 3 Pino Toscano 2010-05-23 14:04:01 UTC
Gah, lilypond places absolute path to the ly file, great way to send a document to somebody else...
Anyway, can you please enable in `kdebugdialog` the okular debug areas 4700 and "okular", then run okular from a terminal and click on the textedit:// link, and attach the output?
Comment 4 Pino Toscano 2010-05-23 18:03:05 UTC
SVN commit 1129748 by pino:

percent-decode lilypond references

BUG: 236967


 M  +2 -1      sourcereference.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1129748
Comment 5 Pino Toscano 2010-05-23 18:05:03 UTC
SVN commit 1129749 by pino:

percent-decode lilypond references

CCBUG: 236967
FIXED-IN: 4.4.4


 _M            . (directory)  
 M  +2 -1      core/sourcereference.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1129749
Comment 6 Valentin Villenave 2010-05-23 22:44:25 UTC
Wow, impressive. I'll build from SVN, and let you know if the fix works as intended (alongside with a debug log if it doesn't). But I'm confident this should do the trick :-)

Many thanks!
Valentin