aboutsummaryrefslogtreecommitdiffstats
path: root/support.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-03-26 17:27:57 +0000
committerKalle Wallin <kaw@linux.se>2004-03-26 17:27:57 +0000
commitc737b402afdbf4eb38109a49c2a0ac2c86462521 (patch)
tree48c9c3ba05a1d00afba10d0043fc7669f2ab0ed3 /support.c
parent1e17a1289f54c440ac552c741e949d66b3e9bfa5 (diff)
downloadmpd-c737b402afdbf4eb38109a49c2a0ac2c86462521.tar.gz
mpd-c737b402afdbf4eb38109a49c2a0ac2c86462521.tar.xz
mpd-c737b402afdbf4eb38109a49c2a0ac2c86462521.zip
Added file langinfo.c, used on systems without nl_langinfo() support.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@503 09075e82-0dd4-0310-85a5-a0d7c8717e4f
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");