chiark / gitweb /
server/dump.c: Try to set the locale on startup.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 24 Jul 2018 19:02:27 +0000 (20:02 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 24 Jul 2018 19:02:27 +0000 (20:02 +0100)
Otherwise we get annoying cronspam if the configuration contains funny
characters.

server/dump.c

index 475fc81..31e08af 100644 (file)
@@ -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();