From 9df886ed8497002e564ba018d7ceab36bfd04ddd Mon Sep 17 00:00:00 2001 From: LRN Date: Tue, 30 Oct 2012 22:12:03 +0000 Subject: 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. --- src/namestore/plugin_namestore_sqlite.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/namestore') diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index 477e7bb16..f0deb7fa9 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c @@ -213,13 +213,8 @@ database_setup (struct Plugin *plugin) return GNUNET_SYSERR; } } -#ifdef ENABLE_NLS - plugin->fn = - GNUNET_STRINGS_to_utf8 (afsdir, strlen (afsdir), nl_langinfo (CODESET)); -#else - plugin->fn = GNUNET_STRINGS_to_utf8 (afsdir, strlen (afsdir), "UTF-8"); /* good luck */ -#endif - GNUNET_free (afsdir); + /* afsdir should be UTF-8-encoded. If it isn't, it's a bug */ + plugin->fn = afsdir; /* Open database and precompile statements */ if (sqlite3_open (plugin->fn, &plugin->dbh) != SQLITE_OK) -- cgit v1.2.3