From 016dbbe6a479d186ca618e9d85a56c045e6f788e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 16 Jul 2015 08:08:18 +0200 Subject: [PATCH] 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. --- CRT.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRT.c b/CRT.c index 983c601f..e341c249 100644 --- a/CRT.c +++ b/CRT.c @@ -585,6 +585,9 @@ void CRT_init(int delay, int colorScheme) { CRT_colorScheme = 1; CRT_setColors(CRT_colorScheme); + /* initialize locale */ + setlocale(LC_ALL, ""); + #ifdef HAVE_LIBNCURSESW char *locale = setlocale(LC_ALL, NULL); if (locale == NULL || locale[0] == '\0')