From: Michael Göhler Date: Wed, 15 Jul 2015 21:37:17 +0000 (+0200) Subject: Merge pull request #91 from Pyrohh/fix-locale X-Git-Url: https://git.danieliu.xyz/?p=smdp.git;a=commitdiff_plain;h=1dfc0dbf2c48d2d445c7514af4081de5c96b875e;hp=34a97f52caaeab111699e943303039c96c168b96 Merge pull request #91 from Pyrohh/fix-locale Fix setting of locale --- diff --git a/src/main.c b/src/main.c index 9920f38..9f0acda 100644 --- a/src/main.c +++ b/src/main.c @@ -90,8 +90,9 @@ int main(int argc, char *argv[]) { } } - // set locale to read and display UTF-8 correctly in ncurses - setlocale(LC_CTYPE, "en_US.UTF8"); + // set locale to that of the environment, so that ncurses properly renders + // UTF-8 characters if the system supports it + setlocale(LC_CTYPE, ""); // open file or set input to STDIN char *file = NULL;