From: Mark Wooding Date: Tue, 24 Jul 2018 19:02:27 +0000 (+0100) Subject: server/dump.c: Try to set the locale on startup. X-Git-Tag: 5.2~10 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/f035a0f736ff030a4e6da9ffe033938dac5e979a server/dump.c: Try to set the locale on startup. Otherwise we get annoying cronspam if the configuration contains funny characters. --- diff --git a/server/dump.c b/server/dump.c index 475fc81..31e08af 100644 --- a/server/dump.c +++ b/server/dump.c @@ -377,6 +377,8 @@ int main(int argc, char **argv) { FILE *fp; mem_init(); + if(!setlocale(LC_CTYPE, "")) + disorder_error(errno, "error calling setlocale"); while((n = getopt_long(argc, argv, "hVc:dDurRaPR", options, 0)) >= 0) { switch(n) { case 'h': help();