From bae4ae1a6afa4516ef0e5349471d572663c6ad1f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 7 Mar 2025 14:28:28 -0500 Subject: [PATCH] Correctly set locale when starting the program --- stdlib/stdlib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/stdlib.c b/stdlib/stdlib.c index bf17aaf..a2c08ff 100644 --- a/stdlib/stdlib.c +++ b/stdlib/stdlib.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +48,8 @@ public void tomo_init(void) USE_COLOR = getenv("COLOR") ? strcmp(getenv("COLOR"), "1") == 0 : isatty(STDOUT_FILENO); if (getenv("NO_COLOR") && getenv("NO_COLOR")[0] != '\0') USE_COLOR = false; + + setlocale(LC_ALL, ""); getrandom(TOMO_HASH_KEY, sizeof(TOMO_HASH_KEY), 0); int rng_fd = open("/dev/urandom", O_RDONLY);