# New Ticket Created by  Peter J. Holzer 
# Please include the string:  [perl #38397]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=38397 >


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.
| |   | [EMAIL PROTECTED]         |
__/   | http://www.hjp.at/ |    -- Holger Lembke in dan-am

Reply via email to