Non-UTF-8 encoded XDG user dirs are displayed wrong.
Steps to reproduce
Reproducing with nautilus for convenience, but it also affects the GtkFileChooser.
- Have a ~/.config/user-dirs.conf text file with the following content:
filename_encoding=koi8r
- Quit nautilus with this command:
nautilus -q
- Run this command to update user-dirs.dirs to ru_RU.KOI8-R:
LANG=ru_RU.koi8r xdg-user-dirs-gtk-update
(In the dialog, choose the second action, which confirms updating the folder names.)
- Launch nautilus in Russian:
LANG=ru_RU.koi8r nautilus
(Afterwards, the previous localization can be restored by running xdg-user-dirs-gtk-update
without the LANG=ru_RU.koi8r part.)
Current behavior
The labels in the sidebar show invalid characters. The tooltip shows escaped URL. The actual file list (both in nautilus and file chooser) properly displays the localized names for these folders (for instance, "Music" is "Музыка").
Expected outcome
The labels in the sidebar should display the localized folder names (ex.: "Музыка").
I'm not sure what the expected tooltip should be. But the encoded URL doesn't seem very useful.
Version information
Gtk+ 3.22.30 on Fedora 28.
Additional information
Originally reported in https://bugzilla.gnome.org/show_bug.cgi?id=710487