Commit cea59118 authored by Christian Hesse's avatar Christian Hesse
Browse files

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.
parent 77df2586
...@@ -587,7 +587,7 @@ void CRT_init(int delay, int colorScheme) { ...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment