From 2bdce789186e00a610b5fc874e800da21af9c842 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 14 Mar 2001 23:33:53 +0000 Subject: Yoshihiko SARUMARU's patch, svn path=/trunk/; revision=3257 --- env.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/env.c b/env.c index 4533275d..da1bfefe 100644 --- a/env.c +++ b/env.c @@ -177,10 +177,14 @@ char *rfc822timestamp(void) * Conform to RFC822. We generate a 4-digit year here, avoiding * Y2K hassles. Max length of this timestamp in an English locale * should be 29 chars. The only things that should vary by locale - * are the day and month abbreviations. + * are the day and month abbreviations. The set_locale calls prevent + * weird multibyte i18n characters (such as kanji) for showing up + * in your Received headers. */ + setlocale (LC_TIME, "C"); strftime(buf, sizeof(buf)-1, "%a, %d %b %Y %H:%M:%S XXXXX (%Z)", localtime(&now)); + setlocale (LC_TIME, ""); strncpy(strstr(buf, "XXXXX"), tzoffset(&now), 5); #else /* -- cgit v1.2.3