summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-07-20 23:46:15 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-07-20 23:46:15 -0400
commit49fa21d023feb89e236ad4d655d96dde3574560e (patch)
tree83ad421695a488680315847c76558d7d2d88049c /main.c
parentbcbdf3f2c90897769394d6d0d23e7714ec471d4f (diff)
downloadbfs-49fa21d023feb89e236ad4d655d96dde3574560e.tar.xz
main: Call setlocale() at startup to use the system locale
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index f925915..ef87898 100644
--- a/main.c
+++ b/main.c
@@ -13,6 +13,7 @@
#include "util.h"
#include <errno.h>
#include <fcntl.h>
+#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -46,6 +47,9 @@ int main(int argc, char *argv[]) {
goto done;
}
+ // Use the system locale instead of "C"
+ setlocale(LC_ALL, "");
+
struct cmdline *cmdline = parse_cmdline(argc, argv);
if (cmdline) {
ret = eval_cmdline(cmdline);