Re: help with UTF8
- From: Raj <ringuva novell com>
- To: poonam chokshi <poonam13 gmail com>
- Cc: glade-users lists ximian com, gtk-app-devel-list gnome org
- Subject: Re: help with UTF8
- Date: Wed, 11 May 2005 14:07:38 +0530
setval=g_locale_to_utf8((gchar*)enckeyval,
(gssize)strlen(string1),
gs1,gs2,NULL);
As per the API at
http://developer.gimp.org/api/2.0/glib/glib-Character-Set-Conversion.html#g-locale-to-utf8
gs1 and gs2 should be locations where the api can store the number of
bytes read and written.
So you should be allocating memory for them. I suggest this:
gsize gs1, gs2;
setval =
g_locale_to_utf8((gchar*)enckeyval,(gsize)strlen(string1),&gs1,&gs2,NULL);
One more thing, enckeyval holds the encrypted string, then why is it
that you
are passing the strlen of string1 ? would both be the same ? Also if
enckeyval is
a NULL terminated string, you can as well pass '-1' instead of strlen.
Regards,
Raj
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]