[v5 PATCH 01/13] shell: Call setlocale
Herbert Xu <[email protected]>
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <ca29c44ba7e8194c178bffc872f636f9053dd356.1717291579.git.herbert@gondor.apana.org.au> |
Call setlocale to initialise locale settings for libc. Signed-off-by: Herbert Xu <[email protected]> --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index 7beb280..1e192f8 100644 --- a/src/main.c +++ b/src/main.c @@ -32,6 +32,7 @@ * SUCH DAMAGE. */ +#include <locale.h> #include <stdio.h> #include <signal.h> #include <sys/stat.h> @@ -101,6 +102,9 @@ main(int argc, char **argv) #if PROFILE monitor(4, etext, profile_buf, sizeof profile_buf, 50); #endif + + setlocale(LC_ALL, ""); + state = 0; if (unlikely(setjmp(main_handler.loc))) { int e; -- 2.39.2