This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add param to email.Utils.decode()
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, ghaering, ishimoto
Priority: normal Keywords: patch

Created on 2002-06-13 03:47 by ishimoto, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
email.utils.diff ishimoto, 2002-06-13 03:47
Messages (5)
msg40291 - (view) Author: Atsuo Ishimoto (ishimoto) * Date: 2002-06-13 03:47
While email.Utils.decode() is a quite useful 
function, I got a real
world problem. 

Here in Japan, I receive a lot of RFC-hostile 
messages everyday. Since
they contains illegal characters cannot be 
converted to Unicode by
JapaneseCodecs, email.Utils.decode() chokes with 
UnicodeError. My
solution is an adding optional 'errors' parameter 
which is passed to unicode()
function. This allows me to replace illegal 
characters, instead of
abandoning entire text.

msg40292 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2002-06-21 10:45
Logged In: YES 
user_id=163326

I'd recommend to assign this patch to Barry Warsaw
(bwarsaw), who is the maintainer of the email module.
msg40293 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-07-22 19:55
Logged In: YES 
user_id=12800

email.Utils.decode() is deprecated in favor of
email.Header.decode_header().  Is this patch still worth it?
 I think email.Utils.decode() ought to go away.
msg40294 - (view) Author: Atsuo Ishimoto (ishimoto) * Date: 2002-08-04 15:45
Logged In: YES 
user_id=463672

New email package looks nice. I don't need this patch 
anymore.
msg40295 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-08-04 15:48
Logged In: YES 
user_id=12800

Cool, thanks.  I'm closing this patch.
History
Date User Action Args
2022-04-10 16:05:25adminsetgithub: 36743
2002-06-13 03:47:15ishimotocreate