Moved setlocale() at the beginning of initialization, should fix regexp

crashes with non-C locale.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2858 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-07-01 17:32:05 +00:00 committed by cras
commit b38316c8ba
2 changed files with 9 additions and 2 deletions

View file

@ -27,7 +27,6 @@
#include "mainwindows.h"
#ifdef HAVE_NL_LANGINFO
# include <locale.h>
# include <langinfo.h>
#endif
@ -155,7 +154,6 @@ void term_common_init(void)
read_settings();
#if defined (HAVE_NL_LANGINFO) && defined(CODESET)
setlocale(LC_CTYPE, "");
if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) {
term_type = TERM_TYPE_UTF8;
term_set_input_type(TERM_TYPE_UTF8);