#include <errno.h>
#include <getopt.h>
+#include <locale.h> // setlocale
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
}
}
+ // set locale to read and display UTF-8 correctly in ncurses
+ setlocale(LC_CTYPE, "en_US.UTF8");
+
// open file or set input to STDIN
char *file = NULL;
FILE *input;