X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fmain.c;h=3d63052c26f7064084dc79eac7f6b6a4f91de6a7;hb=e51b855ccbe106c89063653e1f7e79b1a0a03887;hp=37af9bc13b87a6041225d3074e3898af60f431e5;hpb=8689da8fc361118b05e33f3d19b269e9463040d0;p=smdp.git diff --git a/src/main.c b/src/main.c index 37af9bc..3d63052 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,6 @@ /* * mdp -- A command-line based markdown presentation tool. - * Copyright (C) 2014 Michael Goehler + * Copyright (C) 2015 Michael Goehler * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include #include +#include // setlocale #include #include #include @@ -40,7 +41,7 @@ void usage() { void version() { printf("mdp %d.%d.%d\n", MDP_VER_MAJOR, MDP_VER_MINOR, MDP_VER_REVISION); - printf("Copyright (C) 2014 Michael Goehler\n"); + printf("Copyright (C) 2015 Michael Goehler\n"); printf("License GPLv3+: GNU GPL version 3 or later .\n"); printf("This is free software: you are free to change and redistribute it.\n"); printf("There is NO WARRANTY, to the extent permitted by law.\n"); @@ -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;