-#if defined (USE_ICONV)
-# include <langinfo.h>
-static char charset[sizeof ("CSISO11SWEDISHFORNAMES")] = "";
-
-static void find_charset_once (void)
-{
- strlcpy (charset, nl_langinfo (CODESET), sizeof (charset));
- if (!strcasecmp (charset, "ASCII")
- || !strcasecmp (charset, "ANSI_X3.4-1968"))
- strcpy (charset, "UTF-8"); /* superset... */
-}
-
-static int find_charset (void)
-{
- static pthread_once_t once = PTHREAD_ONCE_INIT;
- pthread_once (&once, find_charset_once);
- return !strcasecmp (charset, "UTF-8");
-}
-#endif
-
-