Mailinglist Archive: opensuse-m17n (44 mails)

< Previous Next >
Bug fix: gtk programs don't work with zh_TW.Big5 locale in SuSE Linux 7.3
  • From: Mike Fabian <mfabian@xxxxxxx>
  • Date: Fri, 18 Jan 2002 16:51:39 +0000 (UTC)
  • Message-id: <s3t4rlj38m2.fsf@xxxxxxxxxxxxxxx>
(Sorry for the repost, the program use to manage this list 'ezmlm'
strips the first boundary of a multipart message if the first part
contains only ASCII. This may make my previous message unreadable for
some of you).

There is a bug in the gtk package contained in SuSE Linux 7.2 which
caused problems for all programs linked against gtk when running
in a zh_TW.Big5 locale.

For example 'gedit' or 'gvim' showed garbage in the menus instead
of traditonal Chinese. A gb2312 font (i.e. a simplified Chinese font)
was used instead of a Big5 font.

SuSE Linux 7.3 contains a gtk.rpm with that bug, SuSE Linux 7.2 had an
older version without that bug.

I believe I have found the problem and have uploaded fixed gtk-packages to

ftp://ftp.suse.com/pub/people/mfabian/7.3-i386/gtk-1.2.10-209.i386.rpm
ftp://ftp.suse.com/pub/people/mfabian/7.3-i386/gtk-devel-1.2.10-209.i386.rpm
ftp://ftp.suse.com/pub/people/mfabian/7.3-ppc/gtk-1.2.10-107.ppc.rpm
ftp://ftp.suse.com/pub/people/mfabian/7.3-ppc/gtk-devel-1.2.10-107.ppc.rpm
ftp://ftp.suse.com/pub/people/mfabian/7.3-src/gtk-1.2.10-209.src.rpm

Everybody who has problems with gtk programs not showing traditional
Chinese menus correctly should try to update to these new packages,
then it should work.

For the curious among you, the patch which fixes the problem is
attached.

It makes a local copy of the return value of setlocale(), which
can then be modified without problems.

Previously, the return value of setlocale was directly modified,
changing it from 'zh_TW.Big5' to 'zh' which had the result
that XCreateFontSet did load a gb2312 font later.

Modifying the return value of setlocale() is not allowed according to
the glibc info pages:

glibc-info> You should not modify the string returned by `setlocale'.

--
Mike Fabian <mfabian@xxxxxxx> http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

< Previous Next >
This Thread