Subject: | qpsmtpd-forkserver doesn't like PERL_UNICODE |
Date: | Wed, 1 Feb 2006 16:45:43 +0100 |
To: | bugs-qpsmtpd [...] rt.perl.org |
From: | "Peter J. Holzer" <hjp [...] hjp.at> |
I accidentally restarted qpsmtpd-forkserver while having
the following locale-related environment variables set:
LC_COLLATE=POSIX
LANG=en_US.UTF-8
PERL_UNICODE=SDAL
The result was that all mails which were not decodable as UTF-8
mere mangled. I.e., mails with a content-transfer-encoding of
quoted-printable or base64 were fine (because then they only contain
ASCII characters and ASCII is a subset of UTF-8) as were mails with
charset UTF-8 and a content-transfer-encoding of 8bit. But mails with a
different charset (iso-8859-*) and 8bit content-transfer-encoding were
mangled.
A simple solution is to explicitely unset PERL_UNICODE (and maybe also
LANG and LC_*) in the startup scripts. I will do that in the next
release of the RPMs.
A real fix would probably be to explicitely call binmode ":raw" on all
filehandles, which need to read/write octets, not characters (I.e., at
least all the sockets, but probably also temporary files, pipes, etc.
(Sounds like a lot of work).
hp
--
_ | Peter J. Holzer | Ich sehe nun ein, dass Computer wenig
|_|_) | Sysadmin WSR | geeignet sind, um sich was zu merken.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Holger Lembke in dan-am