[Please CC: me, I'm not subscribed to this list (yet =D)] Hello, I'm porting the Debian's debconf GNOME frontend to use GNOME2 libs and have found some problems concerning UTF-8. Talking to muppet on IRC we tried very hard to find out what was the problem with not a lot of success, 'till muppet added 'use utf8;' Shouldn't it have worked straight, as the script was written in utf-8? The results, without 'use utf8;' can be found here: http://couve.no-ip.org/~kov/gtk2-perl/ You'll find the three windows that the sample script (attached, but remember, without 'use utf8;') creates. While 'use utf8;' seems to fix most of the problem, GtkMessageDialog still does not like what it receives and converts it to utf-8'ed utf-8 anyways, as you will notice. Following muppet's tips I ended up with the following xs/GtkMessageDialog.xs modifications: [...] gchar * format PREINIT: SV * message; CODE: // message = newSV (0); // sv_vsetpvfn (message, format, SvLEN (ST (5)), // NULL, &(ST (6)), items - 6, Null(bool*)); RETVAL = gtk_message_dialog_new (parent, flags, type, buttons, "%s", format); [...] Changing the type of 'format' to gchar* and then using it instead of the processed message. The problem seems to happen right into the commented out code. That is, indeed a bug, and needs to be taken care of, any takers? =) Thanks a lot, []s! -- kov debian org: Gustavo Noronha <http://people.debian.org/~kov> Debian: <http://www.debian.org> * <http://www.debian-br.org> "Não deixe para amanhã, o WML que você pode traduzir hoje!" http://debian-br.alioth.debian.org/?id=WebWML
Attachment:
sample.pl
Description: Perl program