aboutsummaryrefslogtreecommitdiffstats
path: root/support.c
diff options
context:
space:
mode:
Diffstat (limited to 'support.c')
-rw-r--r--support.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/support.c b/support.c
index 9bf18cc47..de3d80cef 100644
--- a/support.c
+++ b/support.c
@@ -137,18 +137,17 @@ charset_init(void)
}
#endif
-#ifdef HAVE_LANGINFO_CODESET
/* get charset */
if( (charset=nl_langinfo(CODESET)) == NULL )
{
fprintf(stderr,
"nl_langinfo() failed using default:" DEFAULT_CHARSET "\n");
+ charset = DEFAULT_CHARSET;
}
+#ifdef DEBUG
+ fprintf(stderr, "charset: %s\n", charset);
#endif
- if( charset==NULL )
- charset = DEFAULT_CHARSET;
-
#ifdef HAVE_ICONV
/* allocate descriptor for character set conversion */
iconv_from_uft8 = iconv_open(charset, "UTF-8");