Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 340379

Summary: x11-misc/xdg-utils-1.0.2_p20100618: xdg-open fails to open file:// URLs with non-latin symbols
Product: Gentoo Linux Reporter: Vladimir <vl409>
Component: Current packagesAssignee: Freedesktop bugs <freedesktop-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugs.freedesktop.org/show_bug.cgi?id=30757
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Implement URL decoding for non-latin symbols in file:// URLs

Description Vladimir 2010-10-10 18:28:47 UTC
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'.



Reproducible: Always

Steps to Reproduce:
1.Create a file with non-latin name
2.Navigate to some folder with non-latin names in firefox and 'Copy link location' for such file
3.Try to run 'xdg-open <obtained_url>'
file fails to open

For example:
 xdg-open "file:///home/vl/.local/share/data/mentat/EGRP/data/03.%20%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D1%8B%20%D0%BF%D1%80%D0%B8%D0%B2%D0%BE%D0%B4%D0%B0%20%D1%81%20%D0%B4%D1%80%D0%BE%D1%81%D1%81%D0%B5%D0%BB%D1%8C%D0%BD.%20%D1%80%D0%B5%D0%B3/3.%20%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D1%8B%20%D0%B4%D1%80%D0%BE%D1%81%D1%81%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D0%BE%D0%B3%D0%BE%20%D1%80%D0%B5%D0%B3%D1%83%D0%BB%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%20%D1%81%D0%BA%D0%BE%D1%80%D0%BE%D1%81%D1%82%D0%B8%20%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D0%BD%D0%BE%D0%B3%D0%BE%20%D0%B7%D0%B2%D0%B5%D0%BD%D0%B0%20%D0%BF%D1%80%D0%B8%D0%B2%D0%BE%D0%B4%D0%B0.pdf"

Actual Results:  
xdg-open: file '/home/vl/.local/share/data/mentat/EGRP/data/03.\x20\xD0\x9E\xD1\x81\xD0\xBD\xD0\xBE\xD0\xB2\xD1\x8B\x20\xD0\xBF\xD1\x80\xD0\xB8\xD0\xB2\xD0\xBE\xD0\xB4\xD0\xB0\x20\xD1\x81\x20\xD0\xB4\xD1\x80\xD0\xBE\xD1\x81\xD1\x81\xD0\xB5\xD0\xBB\xD1\x8C\xD0\xBD.\x20\xD1\x80\xD0\xB5\xD0\xB3/3.\x20\xD0\x9E\xD1\x81\xD0\xBD\xD0\xBE\xD0\xB2\xD1\x8B\x20\xD0\xB4\xD1\x80\xD0\xBE\xD1\x81\xD1\x81\xD0\xB5\xD0\xBB\xD1\x8C\xD0\xBD\xD0\xBE\xD0\xBE\xD0\xB3\xD0\xBE\x20\xD1\x80\xD0\xB5\xD0\xB3\xD1\x83\xD0\xBB\xD0\xB8\xD1\x80\xD0\xBE\xD0\xB2\xD0\xB0\xD0\xBD\xD0\xB8\xD1\x8F\x20\xD1\x81\xD0\xBA\xD0\xBE\xD1\x80\xD0\xBE\xD1\x81\xD1\x82\xD0\xB8\x20\xD0\xB2\xD1\x8B\xD1\x85\xD0\xBE\xD0\xB4\xD0\xBD\xD0\xBE\xD0\xB3\xD0\xBE\x20\xD0\xB7\xD0\xB2\xD0\xB5\xD0\xBD\xD0\xB0\x20\xD0\xBF\xD1\x80\xD0\xB8\xD0\xB2\xD0\xBE\xD0\xB4\xD0\xB0.pdf' does not exist

Expected Results:  
Expected result is the execution of proper handler for file

xdg-utils version used:

x11-misc/xdg-utils-1.0.2_p20100618  USE="-doc" 


Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.31-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8500_@_3.16GHz-with-gentoo-2.0.1
Timestamp of tree: Sun, 10 Oct 2010 17:15:02 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 1.3.7-r1, 2.1.11
dev-lang/python:     2.5.4-r3, 2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.4_p6-r1, 1.5, 1.7.9-r2, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       3.4.6-r2, 4.1.2, 4.3.4, 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ "
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/java-overlay /usr/local/portage/layman/sunrise"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aalib acl alsa amd64 bash-completion berkdb bzip2 cairo chroot cli consolekit cracklib crypt cups cupsddk cxx dri flac fontconfig fortran gdbm gnome gtk gtk2 iconv jpeg ldap lirc mmx modules mp3 mudflap multilib ncurses nls nptl nptlonly offensive ogg openal opengl openmp pam pcre pdf perl png policykit pppd python qt3support readline reflection samba scanner session slang sqlite srt sse sse2 ssl svg sysfs syslog tcpd tetex tiff truetype unicode usb userlocales vorbis xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" LIRC_DEVICES="avermedia avermedia98" PHP_TARGETS="php-5.2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa nv nvidia vga vmware" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vladimir 2010-10-10 18:31:23 UTC
Created attachment 250137 [details, diff]
 Implement URL decoding for non-latin symbols in file:// URLs
Comment 2 Vladimir 2010-10-10 18:32:41 UTC
The bug is reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=30757

Can gentoo adopt the changes if upstream will not respond (quickly) ?
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-02-05 09:20:51 UTC
I guess this is still valid for 1.1.0_rc1 ?
Comment 4 Vladimir 2011-02-10 21:37:45 UTC
(In reply to comment #3)
> I guess this is still valid for 1.1.0_rc1 ?
> 

It looks like they've fixed it: http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=25af23cb3edf9accde30a5aae36fd6579445bd99

I've copied xdg-open script from 1.1.0_rc1 into my system and URLs are now opened correctly.