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:
Christian Hesse 2015-07-29 11:28:15 +02:00
parent 77df258636
commit cea591181d

2
CRT.c
View File

@ -587,7 +587,7 @@ void CRT_init(int delay, int colorScheme) {
CRT_setColors(CRT_colorScheme);
/* initialize locale */
setlocale(LC_ALL, "");
setlocale(LC_CTYPE, "");
#ifdef HAVE_LIBNCURSESW
if(strcmp(nl_langinfo(CODESET), "UTF-8") == 0)