X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fmain.c;fp=src%2Fmain.c;h=9f0acda95e1f0813be7cdde9d32babb3957505de;hb=afbf5e8ecc843044f751693661d8dbd0788814ef;hp=9920f38006bb7737c0ef77a02d0b934ee33a34a7;hpb=34a97f52caaeab111699e943303039c96c168b96;p=smdp.git 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;