mirror of https://github.com/xzeldon/htop.git
initialize locale
This has two effects: * The locale may have impact on string formatting. So depending on the locale we may end up with different decimal point. * We can use nl_langinfo() for UTF-8 detection.
This commit is contained in:
parent
e5f810e0a2
commit
016dbbe6a4
3
CRT.c
3
CRT.c
|
@ -585,6 +585,9 @@ void CRT_init(int delay, int colorScheme) {
|
||||||
CRT_colorScheme = 1;
|
CRT_colorScheme = 1;
|
||||||
CRT_setColors(CRT_colorScheme);
|
CRT_setColors(CRT_colorScheme);
|
||||||
|
|
||||||
|
/* initialize locale */
|
||||||
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
#ifdef HAVE_LIBNCURSESW
|
#ifdef HAVE_LIBNCURSESW
|
||||||
char *locale = setlocale(LC_ALL, NULL);
|
char *locale = setlocale(LC_ALL, NULL);
|
||||||
if (locale == NULL || locale[0] == '\0')
|
if (locale == NULL || locale[0] == '\0')
|
||||||
|
|
Loading…
Reference in New Issue