summaryrefslogtreecommitdiff
path: root/src/fe-text/irssi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/irssi.c')
-rw-r--r--src/fe-text/irssi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c
index 9a5132dc..d0462aaa 100644
--- a/src/fe-text/irssi.c
+++ b/src/fe-text/irssi.c
@@ -42,6 +42,7 @@
#include "textbuffer-reformat.h"
#include <signal.h>
+#include <locale.h>
#ifdef HAVE_STATIC_PERL
void perl_core_init(void);
@@ -333,6 +334,14 @@ int main(int argc, char **argv)
textdomain(PACKAGE);
#endif
+ /* setlocale() must be called at the beginning before any calls that
+ affect it, especially regexps seem to break if they're generated
+ before t his call.
+
+ locales aren't actually used for anything else than autodetection
+ of UTF-8 currently.. */
+ setlocale(LC_CTYPE, "");
+
textui_init();
args_register(options);
args_execute(argc, argv);