aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 5785ef5..c38b1a3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <stdlib.h>
#include <signal.h>
+#include <locale.h>
#include <glib.h>
#include <glib/gprintf.h>
@@ -306,6 +307,13 @@ main(int argc, char **argv)
signal(SIGINT, teco_sigint_handler);
signal(SIGTERM, teco_sigint_handler);
+ /*
+ * Important for Unicode handling in curses and glib.
+ * In particular, in order to accept Unicode characters
+ * in option strings.
+ */
+ setlocale(LC_ALL, "");
+
g_autofree gchar *mung_filename = teco_process_options(&argc, &argv);
/*
* All remaining arguments in argv are arguments