Commit 016dbbe6 authored by Christian Hesse's avatar Christian Hesse
Browse files

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.
parent e5f810e0
...@@ -585,6 +585,9 @@ void CRT_init(int delay, int colorScheme) { ...@@ -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')
......
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