GNOME Bugzilla – Bug 172240
Nautilus cannot show wallpapers with none UTF-8 .png filenames.
Last modified: 2005-09-20 00:43:49 UTC
Nautilus cannot show wallpapers with none UTF-8 .png filenames. Originally this is caused by bug 172235. When we add none UTF-8 .png files for wallpapers with gnome-background-properties. The wallpaper will be null because gconf values are supported UTF-8 strings only. I'm attaching the patch to treat none UTF-8 .png files.
Created attachment 39501 [details] [review] patch for nautilus-directory-background.c Attached the patch.
does nautilus need to handle wrong filename ? The background capplet should set an UTF-8 rather
Wrong filename does not need to be handled. Yes, background capplet should set UTF-8 string in gconf value becuase gconf value support UTF-8 only. So when nautilus extract string from gconf, it is always UTF-8 strings. But users create filenames with the current encoding so it is needed to search the current encoded filenames.
Takao: Is this still an issue if you replace the patched code by *image = g_filename_to_uri (prefs->wallpaper_filename, NULL, NULL);
Created attachment 46758 [details] [review] patch for nautilus-2.6.1/libbackground/preferences.c Revised patch 39501.
Now in bug 168604, we try to use URI instead of raw filename via gconf. The revised patch is nice to handle this problem.
BG_PREFERENCES_PICTURE_FILENAME is a filename (in terms of beginning with a slash and not having a scheme). Why do you call g_filename_from_uri on it? Shouldn't it be the other way around? (g_filename_to_uri)?
Yes, the current implementation uses filenames. The reason to use URI is it is a locale independence, i.e. multibyte chars will be shown %ab%cd%ef... as ASCII. Gconf db treats UTF-8 string only so I think to change URI is a good idea because we don't support UTF-8 locales only but also ISO8859, EUC or else.
As writor of patch 45718, I thought URI is ultimate solution for real world, the world of non-UTF-8 only. Many people have lots and lots of files of non-UTF-8 filename. URI can help them use those files on background.
This bug should not block the bug that it does. I am marking it as a dup of that bug, which has patches for both libbackground and gnome-background-properties, both of which are in control center. All nautilus needs to do is update from CVS and roll a new tarball once the code is committed. *** This bug has been marked as a duplicate of 168604 ***