[sword-devel] Gtk-1.2: Greek text on buttons

Troy A. Griffitts sword-devel@crosswire.org
Sun, 15 Dec 2002 04:15:14 -0700


Victor,
	Here's a log from #gnome

<scribe> In gtk+ 1.2.x, when setting text to a label, the text is 
defined in the doc as a gchar *
<scribe> which, according to the doc is typedef'd to a char *
<scribe> so...
<scribe> is there a way to set multibyte text on a label in 1.2?
<scribe> or do I have to use a strange 255 character encoding?
<scribe> like if I want greek text on a button?
<danielk> You have to use the user's locale encoding.
<scribe> but if I'm writing a translation package from greek to english...
<scribe> then how do I get greek and english on the same form?
<danielk> Well English is ASCII.
<danielk> And most locale encodings are ASCII compatible.
<scribe> ok, so they'd be in like the upper bytes?
<danielk> Yes.
<scribe> ok, thanks.
<scribe> but really, how would I do something like hebrew and greek?
<danielk> scribe: May I ask why you don't use GTK+ 2.0?
<scribe> there has to be a way to specify stuff like that.
<scribe> right in 2.0 I can use unicode right?
<danielk> yes
<danielk> UTF-8
<danielk> scribe: Go for 2.0.  It'll avoid much hassle.
<scribe> thank you very much danielk.  So, in short.  1.2 uses older 
single byte encodings defined by the user's locale, and 2.0 uses utf8, 
right?
<danielk> Yes.
<scribe> so in 1.2 there is no way to display a range of different 
encodings in the same app?
<danielk> Well you can use Unicode in 1.2 AFAIK, but it's a mess.
<danielk> Very few apps get it right.
<scribe> ah.
<danielk> The only one I know of is Evolution.
<scribe> ok, thanks for the info.  You've been great!
<danielk> np

porton@narod.ru wrote:
> In Gtk-1.2 I want Greek text on a button.
> 
> Can I use an iso10646-1 font (How? Setting a UTF-8 string produces a mess.) or 
> need to use a Greek font?
> 
> Example?