pinosaur
/
smdp.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f79538
)
fixed utf-8 encoding issue
author
Michael Göhler
<somebody.here@gmx.de>
Sun, 14 Sep 2014 09:49:39 +0000
(11:49 +0200)
committer
Michael Göhler
<somebody.here@gmx.de>
Sun, 14 Sep 2014 09:49:39 +0000
(11:49 +0200)
viewer.c
patch
|
blob
|
history
diff --git
a/viewer.c
b/viewer.c
index
f262ea2
..
14acefd
100644
(file)
--- a/
viewer.c
+++ b/
viewer.c
@@
-21,6
+21,7
@@
*
*/
+#include <locale.h> // setlocale
#include <ncurses.h>
#include <stdlib.h>
#include <string.h> // 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);