diff --git a/main.c b/main.c index 8ea298fd..a18bfd22 100644 --- a/main.c +++ b/main.c @@ -1093,7 +1093,9 @@ int main(int argc, char **argv) bindtextdomain("openconnect", LOCALEDIR); #endif - setlocale(LC_ALL, ""); + if (!setlocale(LC_ALL, "")) + fprintf(stderr, + _("WARNING: Cannot set locale: %s\n"), strerror(errno)); #ifdef HAVE_NL_LANGINFO charset = nl_langinfo(CODESET);