From: Michael Tremer Date: Thu, 30 Oct 2025 19:20:34 +0000 (+0000) Subject: client: Use the user's locale if none specified X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35f325af7bcb6e59986b51ee1ce358f2c0815cfb;p=telemetry.git client: Use the user's locale if none specified Signed-off-by: Michael Tremer --- diff --git a/src/client/main.c b/src/client/main.c index 04a60be..1bedad7 100644 --- a/src/client/main.c +++ b/src/client/main.c @@ -19,6 +19,7 @@ #############################################################################*/ #include +#include #include #include #include @@ -157,6 +158,10 @@ static error_t parse(int key, char* arg, struct argp_state* state) { if (state->arg_num < 1) argp_usage(state); + // Use the current locale if nothing has been set + if (!ctx->locale) + ctx->locale = setlocale(LC_ALL, NULL); + break; default: