From: Peter Verthez Date: Sun, 13 Oct 2002 14:19:38 +0000 (+0000) Subject: Use locale_charset (from libcharset) instead of nl_langinfo directly. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=66503442b5e08a675bbe032427d540e07acda15b;p=gedcom-parse.git Use locale_charset (from libcharset) instead of nl_langinfo directly. --- diff --git a/utf8/utf8-locale.c b/utf8/utf8-locale.c index 1b3e255..058ef18 100644 --- a/utf8/utf8-locale.c +++ b/utf8/utf8-locale.c @@ -11,10 +11,10 @@ #include #include -#include #include #include #include "config.h" +#include "libcharset.h" #include "utf8-locale.h" #define INITIAL_OUTSIZE 256 @@ -43,11 +43,11 @@ int open_conversion_contexts() { assert(utf8_to_locale == (iconv_t) -1); assert(locale_to_utf8 == (iconv_t) -1); - utf8_to_locale = iconv_open(nl_langinfo(CODESET), "UTF-8"); + utf8_to_locale = iconv_open(locale_charset(), "UTF-8"); if (utf8_to_locale == (iconv_t) -1) return -1; else { - locale_to_utf8 = iconv_open("UTF-8", nl_langinfo(CODESET)); + locale_to_utf8 = iconv_open("UTF-8", locale_charset()); if (locale_to_utf8 == (iconv_t) -1) { close_conversion_contexts(); return -1;