[Glade-users] help with UTF8

hello folks,

           I am having a strange problem, I am encrypting the a sting
using the tripledes algorithm now when i try to set the encrypted
value obtained to a text entry it gives me error as
WARNING **: Invalid UTF8 string passed to =09pango_layout_set_text()

Now i got to know from somewhere that i need to use the
g_locale_to_utf8() function to convert it to the utf8 string
But my problem is after i do that i get the warning as text entry NULL asse=

This is the piece of code that i am executing=20

char *string1=3D"helloworld";
GError  *error=3DNULL;
gsize *gs1,*gs2;=20
char *val2;
unsigned char *cipher;
char *enckeyval;
gchar *setval;
GtkWidget *mainwindow,Mykeytxt;

mainwindow =3D lookup_widget (GTK_WIDGET (widget), "mainwindow");

enckeyval=3Dencl_EncryptString(string1,cipher,DES_3);//this will return
me the encrypted string

gtk_entry_set_text(GTK_ENTRY(Mykeytxt), strkeyval);
Where am i going wrong?? I have just initialised the gs1 and gs2 no
values in it ..if i need to initialise the gs1 and gs2 what should it
do with it ??
Please any help is appreciated ...


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