Bug 124204 - GIMP Print dialog is broken in non-UTF8 locale
Summary: GIMP Print dialog is broken in non-UTF8 locale
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gimp-print (Show other bugs)
(Show other bugs)
Version: 2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords: i18n
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-24 17:23 UTC by Christian Rose
Modified: 2007-11-30 22:10 UTC (History)
4 users (show)

Fixed In Version: 4.2.6-13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-07-02 14:25:19 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Christian Rose 2004-05-24 17:23:33 UTC
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 &

Comment 1 Göran Uddeborg 2004-05-24 19:32:14 UTC
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.

Comment 2 Leon Ho 2004-05-25 00:19:42 UTC
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?

Comment 3 Göran Uddeborg 2004-05-25 11:52:33 UTC
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.

Comment 4 Leon Ho 2004-06-07 02:54:52 UTC
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!

Comment 5 Tim Waugh 2004-06-07 13:55:09 UTC
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.

Comment 6 Leon Ho 2004-06-10 05:37:45 UTC
No problem, thanks for putting into -13. Please confirm if package
fixes your problem.

Comment 7 Göran Uddeborg 2004-06-10 21:57:47 UTC
Yes it fixes the problem.  I installed gimp-print*-4.2.6-13, and now
the print dialog looks fine! :-)


Note You need to log in before you can comment on or make changes to this bug.