mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 13:04:35 +03:00
Add Unicode support, enabled with the --enable-unicode
flag, which requires libncursesw. Thanks to Sergej Pupykin!
This commit is contained in:
7
htop.c
7
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")) {
|
||||
|
Reference in New Issue
Block a user