summaryrefslogtreecommitdiffstats
path: root/CRT.c
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-07-16 08:08:18 +0200
committerChristian Hesse <mail@eworm.de>2015-07-16 08:08:18 +0200
commit016dbbe6a479d186ca618e9d85a56c045e6f788e (patch)
tree7a48477898f453309fd15863fa8c5b4ca7de66bf /CRT.c
parente5f810e0a2353c61f4e554703bcd64dcce531c1c (diff)
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.
Diffstat (limited to 'CRT.c')
-rw-r--r--CRT.c3
1 files changed, 3 insertions, 0 deletions
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')

© 2014-2024 Faster IT GmbH | imprint | privacy policy