summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-18 12:05:36 +0200
committerYorhel <git@yorhel.nl>2009-10-18 12:05:36 +0200
commitadaf8a609831734c41e89f386bdec83598a0912b (patch)
tree88e6b4318ad4f10316712c5e343dadbac748913a /src/main.c
parent783993dbf5c7f86085c59b08a0faccc1bdf5f9d2 (diff)
Call setlocale() at initialization
This (in combination with linking to ncursesw) fixes the display of non-ASCII characters.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index d3f22d6..697c1e2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,6 +31,7 @@
#include <unistd.h>
#include <sys/time.h>
+#include <locale.h>
int pstate;
@@ -146,6 +147,8 @@ char *argv_parse(int argc, char **argv) {
int main(int argc, char **argv) {
char *dir;
+ setlocale(LC_ALL, "");
+
if((dir = argv_parse(argc, argv)) == NULL)
dir = ".";