[Portland-bugs] [Bug 30757] New: file:// URLs do not decode non-latin symbols (patch included)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Oct 10 11:18:05 PDT 2010


           Summary: file:// URLs do not decode non-latin symbols (patch
           Product: Portland
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: xdg-utils
        AssignedTo: portland-bugs at lists.freedesktop.org
        ReportedBy: vl409 at yandex.ru

Created an attachment (id=39324)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=39324)
Implement URL decoding for non-latin symbols in file:// URLs

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
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:
- thanks to unknown german man ;-)

I reviewed CVS history of xdg-open and found that url decoding was
remvoed in Revision 1.48 with comment 'It still need some work.'

I've tested suggested solution and it really doesn't work. My patch works
at least for me well.

The patch is against gentoo's version, but applies to xdg-open rev 1.52 as well
and works.

I'd like to see this problem fixed, since it blocks the ability for user to
open files with non-latin names using standard methods.

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Portland-bugs mailing list