Bug fix: gtk programs didn't work in zh_TW.Big5 locale



with recent CVS versions of gtk-1.2.10, programs linked against
gtk didn't work in zh_TW.Big5 locale anymore.

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.

The following patch fixes the problem:

Attachment: gtk-cvs-locale.dif
Description: Binary data

(BIt makes a local copy of the return value of setlocale(), which
(Bcan then be modified without problems.
(B
(BPreviously, the return value of setlocale was directly modified,
(Bchanging it from 'zh_TW.Big5' to 'zh' which had the result
(Bthat XCreateFontSet did load a gb2312 font later.
(B
(BModifying the return value of setlocale() is not allowed according to
(Bthe glibc info pages:
(B
(Bglibc-info>     You should not modify the string returned by `setlocale'. 
(B
(BAs I am not subscribe to this list, please CC any responses to me.
(BThank you,
(B
(B      Mike
(B
(B-- 
(BMike Fabian   <mfabian suse de>   http://www.suse.de/~mfabian
$B?gL2ITB-$O$$$$;E;v$NE($ !#(B


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]