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 320968 - locale encoded filename are not displayed correctly
locale encoded filename are not displayed correctly
Status: RESOLVED FIXED
Product: sabayon
Classification: Deprecated
Component: general
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: Maintainers of sabayon
Maintainers of sabayon
Depends on:
Blocks:
 
 
Reported: 2005-11-08 14:31 UTC by Frederic Crozat
Modified: 2007-08-14 17:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to make the filesource pass back filenames in utf8 encoding, always (1.15 KB, patch)
2006-10-10 00:06 UTC, William Lachance
none Details | Review

Description Frederic Crozat 2005-11-08 14:31:17 UTC
Version details: 2.12.1
Distribution/Version: Mandriva cooker

-set G_FILENAME_ENCODING="@locale" in your profile environment
-in sabayon environment, create "Vidéo" file
-check file change in sabayon => Vidéo will be truncated to Vid
and you get :
/usr/lib/sabayon-session:41:PangoWarning: Invalid UTF-8 string passed to
pango_layout_set_text ()
or 
/usr/lib/python2.4/site-packages/sabayon/sessionwindow.py:260 : PangoWarning:
Invalid UTF-8 string passed to pango_layout_set_text ()
Comment 1 William Lachance 2006-10-10 00:04:43 UTC
I could be wrong, but I think the solution here is to use gobject.filename_display_name:

http://www.pygtk.org/docs/pygobject/gobject-functions.html#function-gobject--filename-display-name 

The method is only in PyGTK 2.10, which I don't yet have on my system. Attaching
a patch which probably does what we want-- if someone who does have PyGTK 2.10 on their system wants to verify and apply, go ahead.
Comment 2 William Lachance 2006-10-10 00:06:59 UTC
Created attachment 74379 [details] [review]
Patch to make the filesource pass back filenames in utf8 encoding, always
Comment 3 William Lachance 2006-11-06 01:31:30 UTC
Okay, just verified that this patch works as expected with pygobject 2.12 or better installed. Of course, applying it means that we'll have to bump our pygobject requirement as well. Ok to commit the above patch + a modification to configure.ac to require pygobject 2.12 or greater?
Comment 4 Federico Mena Quintero 2007-08-14 17:11:53 UTC
Oooh, good catch!  Thanks for the patch; I've committed it and added a check for pygobject 2.12.0 (this is all in trunk; should appear in sabayon-2.19.2).

2007-08-14  Federico Mena Quintero  <federico@novell.com>

	* configure.ac: Add a requirement for pygobject 2.12.0 or later
	for pygobject.filename_display_name().

	* lib/sources/filessource.py (FilesChange.get_short_description):
	Convert the filename to UTF-8 before generating a string for
	display.  Patch by Will Lachance <wrlach@gmail.com>.  Fixes
	http://bugzilla.gnome.org/show_bug.cgi?id=320968