mirror of https://github.com/xzeldon/htop.git
initialize locale for LC_CTYPE only
htop uses scanf functions to parse values from proc filesystem. This breaks when initializing locale for LC_NUMERIC because of unexpected commas. So initialize locale for LC_CTYPE only.
This commit is contained in:
parent
77df258636
commit
cea591181d
2
CRT.c
2
CRT.c
|
@ -587,7 +587,7 @@ void CRT_init(int delay, int colorScheme) {
|
||||||
CRT_setColors(CRT_colorScheme);
|
CRT_setColors(CRT_colorScheme);
|
||||||
|
|
||||||
/* initialize locale */
|
/* initialize locale */
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_CTYPE, "");
|
||||||
|
|
||||||
#ifdef HAVE_LIBNCURSESW
|
#ifdef HAVE_LIBNCURSESW
|
||||||
if(strcmp(nl_langinfo(CODESET), "UTF-8") == 0)
|
if(strcmp(nl_langinfo(CODESET), "UTF-8") == 0)
|
||||||
|
|
Loading…
Reference in New Issue