Bug 84593 - translated messages are broken on UTF-8 locale
translated messages are broken on UTF-8 locale
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gtk+ (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Owen Taylor
David Lawrence
:
: 83899 85855 107697 (view as bug list)
Depends On: 101377
Blocks: 84594 84595 84599 84600
  Show dependency treegraph
 
Reported: 2003-02-19 07:51 EST by Akira TAGOH
Modified: 2007-11-30 17:10 EST (History)
6 users (show)

See Also:
Fixed In Version: 1.2.10-28.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-27 16:11:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch (8.35 KB, patch)
2003-02-19 07:52 EST, Akira TAGOH
no flags Details | Diff
patch (fix typo) (8.35 KB, patch)
2003-02-19 08:54 EST, Akira TAGOH
no flags Details | Diff
gtkrc for ja_JP.UTF-8 (238 bytes, text/plain)
2003-08-01 04:32 EDT, Akira TAGOH
no flags Details
gtkrc for ko_KR.UTF-8 (442 bytes, text/plain)
2003-08-01 04:33 EDT, Akira TAGOH
no flags Details
gtkrc for zh_CN.UTF-8 (441 bytes, text/plain)
2003-08-01 04:33 EDT, Akira TAGOH
no flags Details
gtkrc for zh_TW.UTF-8 (624 bytes, text/plain)
2003-08-01 04:34 EDT, Akira TAGOH
no flags Details

  None (edit)
Description Akira TAGOH 2003-02-19 07:51:53 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.2.1) Gecko/20030215

Description of problem:
SSIA. there are two reason.
1) the messages catalogs are not encoded as UTF-8. but bind_textdomain_codeset()
is not also used.
2) we use UTF-8 locale for almost languages. but XLFD in gtkrc.ll is for native
encoding.

Attached patch should works. but covering all of languages with gtkrc.utf8 may
be not enough. actually current gtkrc.utf8 won't work for ja_JP.UTF-8.
ja_JP.UTF-8 is not our default locale for Japanese, though.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.runs any gtk+ apps on UTF-8 locale
2.
3.
    

Actual Results:  translated messages are broken

Expected Results:  translated messages should be shown

Additional info:
Comment 1 Akira TAGOH 2003-02-19 07:52:49 EST
Created attachment 90181 [details]
patch
Comment 2 Akira TAGOH 2003-02-19 08:54:42 EST
Created attachment 90184 [details]
patch (fix typo)
Comment 3 Owen Taylor 2003-02-19 12:30:03 EST
But, the default encoding for gettext() is the encoding of the locale.

+      gchar *encoding = nl_langinfo (CODESET);
+
+      if (encoding)
+	bind_textdomain_codeset ("gtk+", encoding);

Should not be necessary. I don't think think this is right.

Comment 4 Akira TAGOH 2003-02-20 04:52:58 EST
I knew that. but ... Hmm, I couldn't reproduce now. I was confused something.
I think there are still gtkrc issue at least. Bug#83899 is what I consider this.
looks like our iso10646-1 fonts doesn't support some glyphs for KOI8-R and KOI8-U.
Comment 5 Owen Taylor 2003-02-24 12:07:48 EST
gtkrc.utf8 is used in preference to gtkrc.ru. To quote from the
relevant part of the patch:

           * We normalize the charset into a standard form,
           * which has all '-' and '_' characters removed,
           * and is lowercase.
+          *
+          * the search is done in that order:
+          * gtkrc.ll_cc.lowercasecodeset
+          * gtkrc.ll_cc.normalizedcodeset
+          * gtkrc.ll.lowercasecodeset
+          * gtkrc.ll.normalizedcodeset
+          * gtkrc.lowercasecodeset
+          * gtkrc.normalizedcodeset
+          * gtkrc.ll_cc
+          * gtkrc.ll

To handle ja_JP.UTF-8, either a gtkrc.ja.utf8 would have to be
added, or gtkrc.utf8 extended.
Comment 6 Owen Taylor 2003-02-24 12:09:10 EST
(Not intending to attempt to change anything here for GinGin)
Comment 7 Akira TAGOH 2003-02-25 01:41:14 EST
Um, I mean -*-helvetica-medium-r-normal--*-120-*-*-p-*-*-* may be not enough for
ru_RU.UTF-8 (and maybe uk_UA.UTF-8). helvetica font has koi8-* encoding. but
iso-10646-1 has no glyphs for koi8-* somehow.
Comment 8 Leon Ho 2003-05-30 00:49:26 EDT
I have tested around gtk+1 app in utf8 and look like adding file for different utf8 
(ie. gtkrc.ko.utf8) would be a better idea. Extending gtkrc.utf8 seems cannot 
create the best looking for each locale. 
 
Any plan of doing so in Cambridge? What is the future of GTK+1 in Cambridge? 
Comment 9 Leon Ho 2003-07-10 02:40:32 EDT
*** Bug 85855 has been marked as a duplicate of this bug. ***
Comment 10 Akira TAGOH 2003-07-10 03:37:14 EDT
*** Bug 83899 has been marked as a duplicate of this bug. ***
Comment 11 Akira TAGOH 2003-08-01 04:32:49 EDT
Created attachment 93326 [details]
gtkrc for ja_JP.UTF-8
Comment 12 Akira TAGOH 2003-08-01 04:33:22 EDT
Created attachment 93327 [details]
gtkrc for ko_KR.UTF-8
Comment 13 Akira TAGOH 2003-08-01 04:33:49 EDT
Created attachment 93328 [details]
gtkrc for zh_CN.UTF-8
Comment 14 Akira TAGOH 2003-08-01 04:34:18 EDT
Created attachment 93329 [details]
gtkrc for zh_TW.UTF-8
Comment 15 Bill Nottingham 2003-10-21 13:55:13 EDT
Owen, comments on adding the gtkrc for <lang>.utf-8?
Comment 16 Bill Nottingham 2003-10-22 11:32:44 EDT
*** Bug 107697 has been marked as a duplicate of this bug. ***
Comment 17 Owen Taylor 2003-10-22 12:11:32 EDT
Last time I investigated what was going on with problems with
UTF-8 and GTK+-1, I found that there were significant problems with
the font code in xfs and the X server that were making things that
should have worked, not work.

I have a patch for that, but I've never had the time to work on
getting it upstream. 

I guess it wouldn't hurt to put in these .UTF-8 gtkrc files 
(and the one from 101224), but I have significant doubts about
everything working well without fixing the X bugs.
Comment 18 Owen Taylor 2003-10-27 16:11:28 EST
Added the RC files above to the RPM. Seems to work. Thanks!

* Mon Oct 27 2003 Owen Taylor <otaylor@redhat.com> 1:1.2.10-28.1
- Cave like a cheap house of cards and add gdk-pixbuf dependency (#105613)
- Add gtkrc.*.utf8 RC files for CJK (#84593)
- Add a dependency on libgdk to libgtk (#106677)
Comment 19 Jens Petersen 2003-10-27 23:12:34 EST
Confirmed fixed, thanks.  :-)

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