bug in gdkselection or in g_get_charset return value

For some weeks ago I reported that gtk+ HEAD fails/core dumps
if you paste european character from Gtk 1.x -> gtk 2.0 textview/entry.

I took some time today to investigate where it goes wrong 
and I found the bug in file gdkselection-x11.c 

for example:


line 418:             need_conversation=g_get_charset(&charset);

I don't know if it's wrong here or wrong in g_get_charset but one thing
for sure g_get_charset returns only TRUE if it's utf8 charset

This way it only converts if it's already in utf8 format.

line 436: if (need_conversation)
line 437 {
line 438   gchar *utf = g_convert 

chganged this to 

line 418:  gboolean  is_utf8=g_get_charset(&charset);   

line 436: if (is_utf8 == FALSE) 
line 437 {
line 438   gchar *utf = g_convert 

fixed the problem :-) 



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