diff options
author | Christian Hesse <mail@eworm.de> | 2015-07-16 08:08:18 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2015-07-16 08:08:18 +0200 |
commit | 016dbbe6a479d186ca618e9d85a56c045e6f788e (patch) | |
tree | 7a48477898f453309fd15863fa8c5b4ca7de66bf /CRT.c | |
parent | e5f810e0a2353c61f4e554703bcd64dcce531c1c (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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') |