how to set language for non-unicode text

2009-12-28 Thread Han
Hi, I wrote my first linux GUI app using GTK+, which seems to be a very nice tool. One question I had is: how can I set the language for non-unicode text in my application? I tried to use iconv(), but did not work out. The iconv_open call returned error ENOENT (2). Not sure if i am in the corre

Re: how to set language for non-unicode text

2009-12-28 Thread Dov Grobgeld
No, don't use gtk-i18n-list and don't cross post. gtk-app-devel-list is just fine. Gtk works only with unicode in utf8 encoding internally, so if you want a different format on the disk you will have to convert your text on input and output. Regards, Dov On Mon, Dec 28, 2009 at 19:59, Han wrote

Re: how to set language for non-unicode text

2009-12-28 Thread Tor Lillqvist
> I wrote my first linux GUI app using GTK+, which seems to be a very > nice tool. Well, GTK+ is not a "tool" but a library, also called a "tooolkit", so I wonder whether what you actually have been using some higher level GUI application or "toolt" to write code that uses GTK+? Anyway, let's assu

Re: how to set language for non-unicode text

2009-12-29 Thread Han
Sorry. Will just gtk-app-devel-list in future. Looks like GTK indeed encoded the string in Unicode, although the original string was not in Unicode. (gdb) p song_name $2 = 0x810e300 "¸»Ê¿É½ÏÂ" (gdb) x/8 0x810e300 0x810e300: 0xbbc2b8c2 0xbfc28ac3 0xbdc289c3 0x82c38fc3 0x810e31

Re: how to set language for non-unicode text

2009-12-29 Thread Eduardo M KALINOWSKI
Han wrote: > Sorry. Will just gtk-app-devel-list in future. > > Looks like GTK indeed encoded the string in Unicode, although the > original string was not in Unicode. > > (gdb) p song_name > $2 = 0x810e300 "¸»Ê¿É½ÏÂ" > > (gdb) x/8 0x810e300 > 0x810e300:0xbbc2b8c2 0xbfc28ac3 0xbdc289c

Re: how to set language for non-unicode text

2009-12-29 Thread Tor Lillqvist
> Looks like GTK indeed encoded the string in Unicode, although the > original string was not in Unicode. What "the string" and "theoriginal string"? Where did they come from? --tml ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http:/

Re: how to set language for non-unicode text

2009-12-29 Thread Han
On Mon, Dec 28, 2009 at 11:33 PM, Tor Lillqvist wrote: >> I wrote my first linux GUI app using GTK+, which seems to be a very >> nice tool. > > Well, GTK+ is not a "tool" but a library, also called a "tooolkit", so > I wonder whether what you actually have been using some higher level > GUI applic

Re: how to set language for non-unicode text

2009-12-29 Thread Han
On Tue, Dec 29, 2009 at 11:57 AM, Tor Lillqvist wrote: >> Looks like GTK indeed encoded the string in Unicode, although the >> original string was not in Unicode. > > What "the string" and "theoriginal string"? Where did they come from? They came from TAG fields (song name) in a MP3 file. Btw, a