Reset locale after calling embedded Perl, in case it was changed.
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Mon, 20 Dec 2004 11:46:21 +0000 (11:46 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Mon, 20 Dec 2004 11:46:21 +0000 (11:46 +0000)
doc/doc-txt/ChangeLog
src/src/perl.c

index 110a02f7de8ec9f97b72531b9dc80640eb7c4860..181fa93bb4ddf2458a28cc5ae5f988643908a177 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.43 2004/12/17 14:52:44 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.44 2004/12/20 11:46:21 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -187,6 +187,9 @@ Exim version 4.50
     introduction of TLS in release 3.20, but "sometimes" must have been rare
     because the tests only now provoked it.
 
     introduction of TLS in release 3.20, but "sometimes" must have been rare
     because the tests only now provoked it.
 
+46. Reset the locale to "C" after calling embedded Perl, in case it was changed
+    (this can affect the format of dates).
+
 
 Exim version 4.43
 -----------------
 
 Exim version 4.43
 -----------------
index 533d2c47df4aef3699ee6e8feb3444a3ac1487d7..a22fe6f401ff98d86189c0d88f614f4da92f93b8 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/perl.c,v 1.1 2004/10/07 10:39:01 ph10 Exp $ */
+/* $Cambridge: exim/src/src/perl.c,v 1.2 2004/12/20 11:46:21 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -167,7 +167,8 @@ call_perl_cat(uschar *yield, int *sizep, int *ptrp, uschar **errstrp,
   yield = string_cat(yield, sizep, ptrp, str, (int)len);
   FREETMPS;
   LEAVE;
   yield = string_cat(yield, sizep, ptrp, str, (int)len);
   FREETMPS;
   LEAVE;
-
+  
+  setlocale(LC_ALL, "C");    /* In case it got changed */
   return yield;
 }
 
   return yield;
 }