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

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

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>

< Previous Next >
This Thread