From 35d40a980556bac0460dc027a44fb5285cda3364 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Fri, 14 Jul 2006 14:32:08 +0000 Subject: [PATCH] Reset the locale after initializing Perl, as well as after calling a Perl function (which it did previously). --- doc/doc-txt/ChangeLog | 5 ++++- src/src/perl.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index b7198cb58..fc78884fd 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.376 2006/07/14 14:21:27 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.377 2006/07/14 14:32:08 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -111,6 +111,9 @@ PH/19 Added PQsetClientEncoding(conn, "SQL_ASCII") to the pgsql code module. This is apparently needed in addition to the PH/07 change above to avoid any possible encoding problems. +PH/20 Perl can change the locale. Exim was resetting it after a ${perl call, + but not after initializing Perl. + Exim version 4.62 ----------------- diff --git a/src/src/perl.c b/src/src/perl.c index 894c1c59d..4cbcec7f5 100644 --- a/src/src/perl.c +++ b/src/src/perl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/perl.c,v 1.4 2005/02/17 11:58:26 ph10 Exp $ */ +/* $Cambridge: exim/src/src/perl.c,v 1.5 2006/07/14 14:32:09 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -129,6 +129,8 @@ init_perl(uschar *startup_code) perl_eval_sv(sv, G_SCALAR|G_DISCARD|G_KEEPERR); SvREFCNT_dec(sv); if (SvTRUE(ERRSV)) return US SvPV(ERRSV, len); + + setlocale(LC_ALL, "C"); /* In case it got changed */ return NULL; } } -- 2.30.2