[Python-checkins] python/dist/src/Lib/email Encoders.py,1.7,1.8 (original) (raw)

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Thu May 13 18:50:15 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1804

Modified Files: Encoders.py Log Message: encode_7or8bit(): Clearing out some old patches; iso-2202 is non-ASCII but still 7-bit.

Index: Encoders.py

RCS file: /cvsroot/python/python/dist/src/Lib/email/Encoders.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Encoders.py 1 Oct 2002 00:05:24 -0000 1.7 --- Encoders.py 13 May 2004 22:50:12 -0000 1.8


*** 1,7 **** ! # Copyright (C) 2001,2002 Python Software Foundation ! # Author: barry at zope.com (Barry Warsaw)

! """Module containing encoding functions for Image.Image and Text.Text. ! """

import base64 --- 1,6 ---- ! # Copyright (C) 2001-2004 Python Software Foundation ! # Author: barry at python.org (Barry Warsaw)

! """Encodings and related functions."""

import base64


*** 85,89 **** orig.encode('ascii') except UnicodeError: ! msg['Content-Transfer-Encoding'] = '8bit' else: msg['Content-Transfer-Encoding'] = '7bit' --- 84,94 ---- orig.encode('ascii') except UnicodeError: ! # iso-2022-* is non-ASCII but still 7-bit ! charset = msg.get_charset() ! output_cset = charset and charset.output_charset ! if output_cset and output_cset.lower().startswith('iso-2202-'): ! msg['Content-Transfer-Encoding'] = '7bit' ! else: ! msg['Content-Transfer-Encoding'] = '8bit' else: msg['Content-Transfer-Encoding'] = '7bit'



More information about the Python-checkins mailing list