Re: g_locale_to_utf8
- From: "Hubert Sokolowski" <h sokolowski wsisiz edu pl>
- To: "Andreas Volz" <lists brachttal net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: g_locale_to_utf8
- Date: Mon, 10 Jan 2005 10:27:49 +0100 (CET)
Hi,
I've a question how to use the return of the g_locale_to_utf8 function.
For example I've this code:
----------------------
gchar *s;
gchar *string;
string = g_strdup ("hallo");
s = g_locale_to_utf8 (string,-1,0,0,0);
g_print ("%s\n", s);
free (string);
-----------------------
Or should I do:
...
s = g_strdup (g_locale_to_utf8 (string,-1,0,0,0));
g_print ("%s\n", s);
free (string);
free (s);
As I think it's the second version, but I'm not sure. Can you help me?
you should use first version, returnerd string is a new allocated buffer.
regards
hs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]