Re: Missing labels with national chars in some widgets


On Tue, Feb 15, 2000 at 10:47:02PM +0100, Rafa Kleger-Rudomin wrote:

> I've noticed following problem with all gtk apps:
> Labels containing any national character are not displayed
> by some widgets (eg there are missing entries in menu 

That is not a problem of Gtk, but of locales definition, and in
particular of LC_CTYPE; if the language you are talking about doesn't use
latin1 encoding you *MUST* have in the program a line:


(or LC_ALL instead of LC_CTYPE). Without it you can't display localized
text. Note that with Gnome programs that isn't necessary; as it is done 
automatically; but pure Gtk+ doesn't (imho it would be better that pure gtk+
do it too).

You need also to #include locale.h and libintl.h in each *.c file where
you will use gettext() (or the _() macros).
Look at, I write a little tutorial on
how to add gettext() to Gtk+ programs.

> Some people I know reported this problem too, some
> others have not encountered this.

Becasue that depends on the charset encoding; it is unoticed by people
using latin1 letters.

> Do you have any suggestions what could cause the problem or how to track
> it down?

it is missing a setlocale for LC_CTYPE (or LC_ALL; which sets all LC_*.
If you use any date/time function; you need LC_TIME also; so using LC_ALL
is generally the best solution).

> Rafa? Kleger-Rudomin ( 
> -- 
> To unsubscribe: mail with "unsubscribe"
> as the Subject.

Ki a vos vye bn,
Pablo Saratxaga		PGP Key available, key ID: 0x8F0E4975

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