Problems using UTF-8

[Please CC: me, I'm not subscribed to this list (yet =D)]


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:

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

        gchar * format
        SV * message;
//      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,


kov debian org: Gustavo Noronha <>
Debian:  <>  *  <>
  "Não deixe para amanhã, o WML que você pode traduzir hoje!"

Description: Perl program

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