Re: Problem with Pango displaying Greek letters under Linux
- From: Behdad Esfahbod <behdad cs toronto edu>
- To: Nick Chorley <nick chorley gmail com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Problem with Pango displaying Greek letters under Linux
- Date: Wed, 1 Mar 2006 13:49:54 -0500 (EST)
On Wed, 1 Mar 2006, Nick Chorley wrote:
> I have a program with a GUI written in GTK+ (by me!) and I'd really like to
> be able to display Greek letters, rather than write things like "alpha".
> Note that this is *not* a programming question, because the problem is not
> how to put Greek letters in labels (as I found out how to do that). The
> program compiles fine, but when I run it, I get the following error message:
>
> Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
>
> and the Greek letters aren't displayed. I'm using version 1.8.2 of Pango and
> what's puzzling me is that *the same code works fine under FreeBSD 6.0, with
> the same version of Pango*. For information, I'm using things like "\u03B1"
> as the strings for the labels in GTK+, e.g.
>
> GtkWidget *label = gtk_label_new("\u03B2");
The interpretation of such a thing pretty much depends on your
compiler, but most probably this doesn't generate what you have
in mind, or at list not on your Linux. Try using
g_unichar_to_utf8 instead.
behdad
> Any ideas as to why this doesn't work right under Linux?
>
> Thanks!
--behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]