Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382441 - x11-misc/xdg-utils-1.1.0_rc1_p20110519 makes assumptions about LC_COLLATE, xdg-open fails at http URLs
Summary: x11-misc/xdg-utils-1.1.0_rc1_p20110519 makes assumptions about LC_COLLATE, xd...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-09 23:12 UTC by Siim Ainsaar
Modified: 2011-10-20 22:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Siim Ainsaar 2011-09-09 23:12:31 UTC
There are many places in the scripts of x11-misc/xdg-utils where z is assumed to be the last letter of the alphabet. Just "grep a-z /usr/bin/xdg-*" to see many (all?) of them. In reality, the last letter of the alphabet depends on LC_COLLATE. While I'm aware http://www.gentoo.org/doc/en/guide-localization.xml recommends to set (at least as a system-wide default) LC_COLLATE="C", I would still prefer my file listings to be sorted according to my native language. Usually this does not cause any problems, but xdg-open ceases to open http URLs with LC_COLLATE=et_EE.UTF-8, because the Estonian alphabet goes like "qprsšzžtuv" and "http" is deemed non-alphabetical by the script. In this case, replacing "a-zA-Z" by "[:alpha:]" in /usr/bin/xdg-open solves the issue, but, as the aforementioned grep shows, there are other potential problematic lines to be (hopefully) analogously patched.

To reproduce my problem, run
LC_COLLATE=et_EE.UTF-8 xdg-open http://www.gentoo.org

You should get an annoying message
xdg-open: file 'http://www.gentoo.org' does not exist

An analogous command
LC_COLLATE=C xdg-open http://www.gentoo.org
works and opens the respective webpage.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2011-10-03 09:15:04 UTC
Can you give,

+*xdg-utils-1.1.0_rc1_p20111003 (03 Oct 2011)
+
+  03 Oct 2011; Samuli Suominen <ssuominen@gentoo.org>
+  +xdg-utils-1.1.0_rc1_p20111003.ebuild:
+  New snapshot for solving bugs #367993 (x-scheme-handler) and #374015
+  (bashism). Thanks to Cyprien Nicolas, Naohiro Aota and "Faustus".

A try?

If the problem is still there, I suggest you file a bug at http://bugs.freedesktop.org/ against xdg-utils component and add a upstream link to this bug.
Comment 2 Siim Ainsaar 2011-10-20 21:49:30 UTC
Yes, it is fixed indeed in x11-misc/xdg-utils-1.1.0_rc1_p20111003! Can the bug be closed as FIXED now or do we have to wait for #387301 so that the fixed version would be stable?