summaryrefslogtreecommitdiff
path: root/src/ne_i18n.c
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2005-08-29 16:29:05 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2005-08-29 16:29:05 +0000
commit28a605a142dc9fcd6f7490121c75c4b855c38de2 (patch)
tree23806794b24c5ce34318a3cedf726e41c0efe21e /src/ne_i18n.c
parentef3565de9526bf9b23097b820a21d9893c87861a (diff)
downloadneon-28a605a142dc9fcd6f7490121c75c4b855c38de2.tar.gz
* src/ne_i18n.h (ne_i18n_init): Take an encoding parameter.
* src/ne_i18n.c (ne_i18n_init) [HAVE_BIND_TEXTDOMAIN_CODESET]: Call bind_textdomain_codeset if encoding is specified. * macros/neon.m4 (NEON_I18N): Fix to enable NLS by default. Check for bind_textdomain_codeset. * test/common/tests.c (main): Pass NULL to ne_i18n_init. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@691 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_i18n.c')
-rw-r--r--src/ne_i18n.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ne_i18n.c b/src/ne_i18n.c
index 608bed2..0fb4a3b 100644
--- a/src/ne_i18n.c
+++ b/src/ne_i18n.c
@@ -27,7 +27,7 @@
#include <libintl.h>
#endif
-void ne_i18n_init(void)
+void ne_i18n_init(const char *encoding)
{
#if defined(NE_HAVE_I18N) && defined(NEON_IS_LIBRARY)
/* The bindtextdomain call is only enabled if neon is built as a
@@ -36,5 +36,12 @@ void ne_i18n_init(void)
* message catalogs could be installed alongside the app's own
* message catalogs. */
bindtextdomain("neon", LOCALEDIR);
+
+#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
+ if (encoding) {
+ bind_textdomain_codeset("neon", encoding);
+ }
+#endif /* HAVE_BIND_TEXTDOMAIN_CODESET */
+
#endif
}