aboutsummaryrefslogtreecommitdiff
path: root/src/datacache
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2012-10-30 22:12:03 +0000
committerLRN <lrn1986@gmail.com>2012-10-30 22:12:03 +0000
commit9df886ed8497002e564ba018d7ceab36bfd04ddd (patch)
tree4ce33c4fad5486af3d45ececb47aff7110ed8c74 /src/datacache
parent3b9cf09a1fbae43883b61c9fd0d33083fa7a6b6c (diff)
downloadgnunet-9df886ed8497002e564ba018d7ceab36bfd04ddd.tar.gz
gnunet-9df886ed8497002e564ba018d7ceab36bfd04ddd.zip
Fix ENABLE_NLS usage
ENABLE_NLS is for gettext only, it's not an indicator of nl_langinfo availability. Use unistring instead of nl_langinfo, since unistring is always there. GNUnet supports UTF-8 now (or should support), so most conversions are unnecessary anyway.
Diffstat (limited to 'src/datacache')
-rw-r--r--src/datacache/plugin_datacache_sqlite.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c
index 49bdc017e..62d5445b4 100644
--- a/src/datacache/plugin_datacache_sqlite.c
+++ b/src/datacache/plugin_datacache_sqlite.c
@@ -370,12 +370,8 @@ libgnunet_plugin_datacache_sqlite_init (void *cls)
370 GNUNET_break (0); 370 GNUNET_break (0);
371 return NULL; 371 return NULL;
372 } 372 }
373#ifdef ENABLE_NLS 373 /* fn should be UTF-8-encoded. If it isn't, it's a bug. */
374 fn_utf8 = GNUNET_STRINGS_to_utf8 (fn, strlen (fn), nl_langinfo (CODESET)); 374 fn_utf8 = GNUNET_strdup (fn);
375#else
376 /* good luck */
377 fn_utf8 = GNUNET_STRINGS_to_utf8 (fn, strlen (fn), "UTF-8");
378#endif
379 if (SQLITE_OK != sqlite3_open (fn_utf8, &dbh)) 375 if (SQLITE_OK != sqlite3_open (fn_utf8, &dbh))
380 { 376 {
381 GNUNET_free (fn); 377 GNUNET_free (fn);