summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2008-03-09 02:33:23 +0000
committerHisham Muhammad <hisham@gobolinux.org>2008-03-09 02:33:23 +0000
commit8fa33dc3365f0e27a5013748321def4bef937049 (patch)
treecf1498456001b55157c4ce9dcd516dd5226158e3 /htop.c
parentfa87ff02514cdd148cdcf8d24de0599a400f3918 (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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/htop.c b/htop.c
index ec5d79e3..50ecb416 100644
--- a/htop.c
+++ b/htop.c
@@ -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")) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy