-void charset_initialize(void)
-{
-#ifdef HAVE_LANGINFO_CODESET
- char buff[STRING];
- char buff2[STRING];
-
- m_strcpy(buff, sizeof(buff), nl_langinfo(CODESET));
- charset_canonicalize(buff2, sizeof(buff2), buff);
-
- /* finally, set $charset */
- if (!m_strisempty(buff2)) {
- m_strreplace(&MCharset.charset, buff2);
- } else
-#endif
- {
- m_strreplace(&MCharset.charset, "iso-8859-1");
- }
-
- Charset_is_utf8 = !m_strcmp(MCharset.charset, "utf-8");
- CharsetReplacement = Charset_is_utf8 ? 0xfffd : '?';
-
-#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
- bind_textdomain_codeset(PACKAGE, MCharset.charset);
-#endif
-}
-