Add Unicode support, enabled with the --enable-unicode

flag, which requires libncursesw.
Thanks to Sergej Pupykin!
This commit is contained in:
Hisham Muhammad
2008-03-09 02:33:23 +00:00
parent fa87ff0251
commit 8fa33dc336
13 changed files with 174 additions and 50 deletions

7
htop.c
View File

@ -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")) {