From cbcab1e9d36dee41eb493409507510d8354546c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20G=C3=B6hler?= Date: Sun, 14 Sep 2014 11:49:39 +0200 Subject: [PATCH] fixed utf-8 encoding issue --- viewer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/viewer.c b/viewer.c index f262ea2..14acefd 100644 --- a/viewer.c +++ b/viewer.c @@ -21,6 +21,7 @@ * */ +#include // setlocale #include #include #include // strchr @@ -74,6 +75,9 @@ int ncurses_display(deck_t *deck, int notrans, int nofade) { slide = slide->next; } + // set locale to display UTF-8 correctly in ncurses + setlocale(LC_CTYPE, ""); + // replace stdin with current tty if markdown input was piped freopen("/dev/tty", "rw", stdin); -- 2.20.1