This was originally reported against GIMP on bugzilla.gnome.org as bug report http://bugzilla.gnome.org/show_bug.cgi?id=142852. Since the owner believes this problem is related to gettext/glibc problems on Fedora specifically, and not GIMP nor gimp-print upstream, the problem is reported here aswell. Problem description: When running GIMP in a non-UTF8 locale, say sv_SE, the Print dialog in GIMP will show all translated strings garbled, i.e. strings in the interface that are normally containing non-ASCII characters are being truncated at the position of the first non-ASCII character. At the same time, lots of errors of this kind are being logged to the console: (print:3682): Gtk-WARNING **: Invalid input string ** (print:3682): WARNING **: Invalid UTF8 string passed to pango_layout_set_text() Steps to reproduce: Start GIMP in a translated, non-UTF8, locale and inspect the Print dialog. Example: $ LANG=sv_SE gimp &
Since there was some confusion with my upstream report, I could add here to Christian's too: This happens ONLY to the print dialog. The remaining dialogs in gimp work fine.
I found out the gimp-print.po is encoded in ISO-8859-1, but gimp20.po is encoded in UTF-8. Any reason the gimp-print is not encoded as UTF-8?
I don't know the reason, maybe simply historical. I did a little test, and recoded the gimp-print message catalog on my system to UTF-8 (and changed the header to reflect it). But the gimp print dialog still has the same problem. So whatever the reason for the difference is, this difference does not seem to be what triggers this bug.
I spent some time on looking at the gimp-print src. Main problem is that it does not have bind_textdomain_codeset() call to enforce UTF-8 encoding for gtk+2. ie. --- print-util.c 2004-06-07 10:40:59.132085936 +1000 +++ print-util.c.mod 2004-06-07 10:40:54.830739840 +1000 @@ -1679,6 +1679,7 @@ #ifdef ENABLE_NLS setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); + bind_textdomain_codeset (PACKAGE, "UTF-8"); #endif stp_init_debug(); } I found out this problem in our package. Please check with CVS trunk version and see if it still has problem. Then you can refer this bug to upstream. I am going to reassign to gimp-print for tracking. Thanks!
Reported upstream: https://sourceforge.net/tracker/index.php?func=detail&aid=968083&group_id=1537&atid=101537 and fixed in 4.2.6-13. Thanks for investigating.
No problem, thanks for putting into -13. Please confirm if package fixes your problem.
Yes it fixes the problem. I installed gimp-print*-4.2.6-13, and now the print dialog looks fine! :-)