After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 114296 - file and icon entries cannot handle locale's encoded filenames
file and icon entries cannot handle locale's encoded filenames
Status: RESOLVED OBSOLETE
Product: libgnomeui
Classification: Deprecated
Component: general
CVS HEAD
Other All
: Normal major
: future
Assigned To: libgnomeui maintainers
libgnomeui maintainers
Depends on:
Blocks:
 
 
Reported: 2003-06-02 23:18 UTC by Hidetoshi Tajima
Modified: 2010-12-21 08:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Hidetoshi Tajima 2003-06-02 23:18:39 UTC
In G_BROKEN_FILENAMES==True environments,(so
are RHL 8 & 9 environemtns by default),

test-gnome, a libgnomeui test program, cannot
handle locale's encoded filenames at least in the
following two widgets.

[case 1:file entry]
  1. bring up a "file entry" and browse any existing   
     file whose filename contains current locale's 
     string.
  2. Clicking "Update file labels" does not show
     the filename at "File name(if exists only)".
 
[case 2:icon entry]
  1. bring up a "icon entry and browse a existing 
     image-file (png, jpeg,..) whose filename 
     contains current locale's string.
  2. It does not show the image, and wrongly
     says "Nothing selected" for the icon filename.

It is because of lack of conversion bettween file-systems's filenames and
UTF-8. While gtk-entry uses UTF-8 in set&get_text functions(),
g_file_test(), gdk_pixbuf_new_file(), ..these must 
be called with filename strings which are actually used in the filesystem.
Comment 1 Kjartan Maraas 2003-06-08 18:36:14 UTC
Sorry for the spam. Just trying something
Comment 2 Kjartan Maraas 2003-07-02 13:31:56 UTC
Do you have a patch to fix this?
Comment 3 Kjartan Maraas 2004-01-18 18:25:28 UTC
Any news here?
Comment 4 Artur Brodowski 2004-07-09 11:14:05 UTC
I'm not sure if it's exactly the same issue, but I have encountered similar 
problems when opening and diplaying names of files that contained ISO-8859-2
characters (my locales are pl_PL) in few gnome applications. The files seem 
to open (using new filechooser) and save just fine, wihout a need to convert 
the strings, but when trying to diplay the names of the files I'm getting pango
errors (non-valid UTF-8 strings). Names are shown partially, or not shown at all.
There is quite simple fix for this:
use g_get_charset to check if system locale is UTF-8, if not, use g_strcompress
and g_filename_to_utf8 functions to convert filenames to utf8. 
In my opinion this should be done by filechooser (or any othe widget that
provides a filename), so applications would oparate only on valid UTF-8 
filenames.
Comment 5 Kjartan Maraas 2009-05-02 08:45:53 UTC
Is this problem still there or are we handling these situations now? I guess most people have moved towards using UTF-8 for filenames by now though?
Comment 6 Kjartan Maraas 2010-12-21 08:24:32 UTC
No response in ages. If this is still a problem the new bug should be filed against gtk+ I guess.