X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fmain.c;h=e762fbbb4a60d14f1b79cb8c07a74e59f5c0859d;hb=51b2a847fc5798c5b0f56ae93f6e1355038df840;hp=37af9bc13b87a6041225d3074e3898af60f431e5;hpb=8689da8fc361118b05e33f3d19b269e9463040d0;p=smdp.git diff --git a/src/main.c b/src/main.c index 37af9bc..e762fbb 100644 --- a/src/main.c +++ b/src/main.c @@ -19,6 +19,7 @@ #include #include +#include // setlocale #include #include #include @@ -82,6 +83,9 @@ int main(int argc, char *argv[]) { } } + // 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;