diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2008-03-09 02:33:23 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2008-03-09 02:33:23 +0000 |
commit | 8fa33dc3365f0e27a5013748321def4bef937049 (patch) | |
tree | cf1498456001b55157c4ce9dcd516dd5226158e3 /htop.c | |
parent | fa87ff02514cdd148cdcf8d24de0599a400f3918 (diff) |
Add Unicode support, enabled with the --enable-unicode
flag, which requires libncursesw.
Thanks to Sergej Pupykin!
Diffstat (limited to 'htop.c')
-rw-r--r-- | htop.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -11,6 +11,7 @@ in the source distribution for its full text. #include <sys/param.h> #include <ctype.h> #include <stdbool.h> +#include <locale.h> #include "ProcessList.h" #include "CRT.h" @@ -221,6 +222,12 @@ int main(int argc, char** argv) { uid_t userId = 0; int sortKey = 0; + char *lc_ctype = getenv("LC_CTYPE"); + if(lc_ctype != NULL) + setlocale(LC_CTYPE, lc_ctype); + else + setlocale(LC_CTYPE, getenv("LC_ALL")); + int arg = 1; while (arg < argc) { if (String_eq(argv[arg], "--help")) { |