[Email-SIG] koi8 and base64

Ben Gertzfield che at debian.org
Thu Apr 22 14:35:33 EDT 2004


On Apr 22, 2004, at 10:15 AM, Oleg Broytmann wrote:

> On Thu, Apr 22, 2004 at 10:03:39AM -0700, Ben Gertzfield wrote:
>> koi8-r is an 8-bit character set; it MUST be encoded either with
>> Quoted-Printable or Base64 in order to make it through 7-bit email
>> gateways.
>
>    I have not saw a 7-bit gateway for quite a number of years. As I 
> have
> said, most MUAs/MTAs pass koi8-r (and windows-1251) unencoded. Most 
> spam
> messages are encoded.

Just because many MTAs understand 8-bit data does not mean you can 
violate RFC 2822.  There are still a lot of legacy email gateways out 
there that will choke on 8-bit email.  I've personally run into 
several, even recently.

>    And why you haven't added windows-1251, then?

Windows-1251 should be added, I agree.

However, as a fallback, we already default to Base-64 for unknown 
character sets, so Windows-1251 will be treated just like koi8-r.

>    And, btw, this is a job of smtplib, not email. If two SMTP MTAs
> announced to each other that they are 8bit clean - there is no need to
> encode anything. So let the email package don't do unneccessary work.

I totally disagree.  Emails must be completely restructured at the most 
fundamental level for character set transformation and encoding issues. 
  Look at EUC-JP as input for a good example; it must be converted to 
ISO-2022-JP, line-wrapped in a 16-bit character sensitive way, etc.  
This is not the job of an SMTP library!

MIME is an issue for the creator of the email to handle; we don't know 
that a user who needs to send a MIME email will use smtplib; they could 
just as easily use their local MTA which can't do encoding 
transformations, so we can't assume we can rely on the SMTP library to 
change encodings of MIME bodies on the fly.

Ben




More information about the Email-SIG mailing list