Re: Character translation in GtkText



On Tue, 06 Jul 1999, you wrote:

> If I understand correctly, what you are referring to is that
> strings are typically interpreted in GTK+ according to
> locale. So, if you have some high ascii characters, they

Correct. I'm currently using the default 'C' locale and calling
gtk_set_locale() at the beginning of the code.

> This interpretation of high ascii characters according to
> the locale only happens if the font being used is a
> _fontset_ instead of a simple font.  (A fontset is a list of

I saw this at gtktext.c:966.

>  font = gdk_font_load ("-adobe-helvetica-medium-r-normal-*-*-120-*-*-p-*-iso8859-1");
>  gtk_text_insert (GTK_TEXT (widget), font, NULL, NULL, string, length);

This actually didn't fix things. I did find out what the problem is, though:
the data I'm displaying is in a Macintish character format. I thought my present
translation was capturing the important bits, but I found out that it wasn't
in fact doing such. After adding a bigger translation table, I'm up to speed.
Gtk is doing the display properly without the above code.

> P.S. - for some background on fontsets, locales, etc, you
>         can see: 
> 
>   http://developer.gnome.org/doc/whitepapers/gtki18n/index.html

This is sitting on my desk, ready to be read...

Many thanks,

m.

-- 
"How wonderful! How mysterious                                   Programmer
 I carry wood! I draw water!"                   Loki Entertainment Software
 - Anonymous Tao poet



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