I finally found my bug in gletter. I replaced; g_unichar_to_utf8 (gdk_keyval_to_unicode(keyval),utf8char); By: i = g_unichar_to_utf8 (gdk_keyval_to_unicode(keyval),utf8char); utf8char[i]='\0'; I fixed several compile warning as well. Yan, can you please check it works for you as well. Bruno.