[Nautilus-list] g_iconv patch for libnautilus-private/nautilus-desktop-file-loader.c
- From: Jean Schurger <jschurger schurger org>
- To: nautilus-list lists eazel com
- Subject: [Nautilus-list] g_iconv patch for libnautilus-private/nautilus-desktop-file-loader.c
- Date: 26 Dec 2001 12:42:33 +0100
To use the g_iconv API to be more portable.
--
Jean Schurger fr alcove com - Free Software Engineer
Alcove - (+33) 149 226 800 - http://www.alcove.com
jschurger schurger org - (+33) 661 415 920
PGP Fingerprint : E6487B18CAD0810469E98869790D563DEBA1535
--- tmp/nautilus/libnautilus-private/nautilus-desktop-file-loader.c Wed Dec 5 19:58:01 2001
+++ g2/src/nautilus/libnautilus-private/nautilus-desktop-file-loader.c Wed Dec 26 10:16:38 2001
@@ -994,7 +994,7 @@
static gboolean initialized = FALSE;
gchar *pout, *pin, *buf;
gint len, ulen = 0, ib, ob;
- iconv_t fd;
+ GIConv fd;
G_LOCK (init_validate);
if (!initialized) {
@@ -1009,7 +1009,7 @@
len = strlen (str);
if (looks_utf8 (str, len, NULL, &ulen)) {
- if ((fd = iconv_open (locale, "UTF-8")) != (iconv_t)-1) {
+ if ((fd = g_iconv_open (locale, "UTF-8")) != (iconv_t)-1) {
ib = len;
ob = ib * 3;
pout = buf = g_new0 (gchar, ob);
@@ -1017,12 +1017,12 @@
/* not portable either */
- if (iconv (fd, &pin, &ib, &pout, &ob) == (size_t)-1) {
+ if (g_iconv (fd, &pin, &ib, &pout, &ob) == (size_t)-1) {
g_free (buf);
buf = NULL;
}
- iconv_close (fd);
+ g_iconv_close (fd);
}
} else {
buf = g_strdup (str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]