Unexpected UTF



Hi Gang!

I'm getting an unexpected "Invalid UTF-8" thingy-ma-gumby with this
function:

void on_execute_button_clicked (GtkButton *button, gpointer user_data)
{
        GtkWidget *entry1  = lookup_widget(GTK_WIDGET(button), "entry1" );
        GtkWidget *entry2  = lookup_widget(GTK_WIDGET(button), "entry2" );
        GtkWidget *window1 = lookup_widget(GTK_WIDGET(button), "window1");
        
        if (entry1 == NULL || entry2 == NULL) {
                quick_message(window1, "You must provide both a PAR and RAR file.");
        }

        g_print("entry1: %s\nentry2: %s\n", entry1, entry2);
}

The above function prints out:
[Invalid UTF-8] entry1: \x80.\x0b\x08\x02
entry2: \x80.\x0b\x08\x02

On the GUI, entry1 has this displayed (I'm using a file selection to set
the text in the empty entry field):
/home/tony/News/Pan/live/OST - Halo Music.PAR2

... and entry2 has:
/home/tony/News/Pan/live/OST - Halo Music.part01.rar


Thanks for your help ;-)

--Tony


-- 
Tony Freeman <tony freeman insightbb com>




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