xdg-open does not decode URLs with non-latin symbols

Bug #654099 reported by VL
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdg-utils (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: xdg-utils

Attempt to open file:// URL with non-latin symbols in it leads
to failure, because no decoding happens for URL. The script
tests if file exists and gets false result, because it attempts to
find a name with stuff file this '%D0%B3%D0%BB%D0%B' in name.

Appropirate place in script is marked as 'TODO'.

For example this is what happens when i try to open local filename
with name in russian from my Qt program:

Attempt to open: QUrl( "file:///home/vl/.local/share/data/mentat/EGRP/data/01. Назначение ЭГРП/1. Назначение гидроприводов Л.А.pdf" )
xdg-open: file '/home/vl/.local/share/data/mentat/EGRP/data/01.%20%D0%9D%D0%B0%D0%B7%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5%20%D0%AD%D0%93%D0%A0%D0%9F/1.%20%D0%9D%D0%B0%D0%B7%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5%20%D0%B3%D0%B8%D0%B4%D1%80%D0%BE%D0%BF%D1%80%D0%B8%D0%B2%D0%BE%D0%B4%D0%BE%D0%B2%20%D0%9B.%D0%90.pdf' does not exist

The xdg fails to open file, although it exists:

$ file "/home/vl/.local/share/data/mentat/EGRP/data/01. Назначение ЭГРП/1. Назначение гидроприводов Л.А.pdf"
/home/vl/.local/share/data/mentat/EGRP/data/01. Назначение ЭГРП/1. Назначение гидроприводов Л.А.pdf: PDF document, version 1.4

The problem can be easily fixed with suggested patch - it decodes URL using sed, no perl/php is required.
The solution was obtained here: http://spielwiese.la-evento.com/xelasblog/archives/23-URL-decode-und-encode-in-der-Bash.html - thanks to unknown german man ;-)

Revision history for this message
VL (vl409) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software

Changed in xdg-utils (Ubuntu):
importance: Undecided → Low
tags: added: patch
Revision history for this message
Bryce Harrington (bryce) wrote :

This is now fixed in the current version of xdg-open we have in natty:

http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=25af23cb3edf9accde30a5aae36fd6579445bd99

Changed in xdg-utils (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.