Re: gtk_entry_new and accented chars
- From: "Luiz Rafael Culik Guimaraes" <luiz xharbour com br>
- To: "Tor Lillqvist" <tml iki fi>
- Cc: GTK developer list <gtk-app-devel-list gnome org>
- Subject: Re: gtk_entry_new and accented chars
- Date: Thu, 17 Jan 2008 01:55:46 -0200
Hi
I manage to get the latin1 with this code
p1 = (event->type==GDK_KEY_PRESS)? WM_KEYDOWN : WM_KEYUP;
p2 = ((GdkEventKey*)event)->keyval;
uchar= gdk_keyval_to_unicode(((GdkEventKey*)event)->keyval);
tmpbuf=g_new0(gchar,7);
g_unichar_to_utf8(uchar,tmpbuf);
res=g_locale_from_utf8(tmpbuf,-1,NULL,NULL,NULL);
but for accented char i dont get the correct unicode value
for example
for char ä i get this values
(((GdkEventKey*)event)->keyval = 65506
(((GdkEventKey*)event)->keyval = 65111
(((GdkEventKey*)event)->keyval = 97
some thing like my char is get in pieces, any ideia on how to do this work?
Regards
Luiz
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]