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: Encoding of "=" by quopri.py module
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jhylton Nosy List: gillou, jhylton
Priority: normal Keywords:

Created on 2000-10-03 12:47 by gillou, last changed 2022-04-10 16:02 by admin. This issue is now closed.

Messages (2)
msg1785 - (view) Author: Gilles Lenfant (gillou) Date: 2000-10-03 12:47
While making an automated mail sending engine, I used the quopri.encode(...) for my multipart mails.
quopri.encode(...) converts "=" into "==" while the mail clients expect "=3D". Thus I got some problems reading such mails with Outlook Express 5 , Netscape Messenger (Linux) and StarOffice Mail (Linux). Especially when the HTML part of the mail contains hyperkinks <a href=...>...</a> that crash Outlook express. The others make a 404 HTTP error.
I run Python 1.5.2, but this bug/feature remains perhaps with Python 1.6 and Python 2.0bx cause I didn't notice any change log to the quopri module.
I found a workaround (fix ?) by changing the "quote" function of "quopri.py" to this:
==== quopri.py ====
...
def quote(c):
## if c == ESCAPE:
##  return ESCAPE * 2
## else:
  i = ord(c)
  return ESCAPE + HEX[i/16] + HEX[i%16]
...
==== end quopri.py ====
Now, the 3 above mentioned mail clients read correctly the raw text and html parts of my mails - including hyperlinks.
Is it a bug, a feature, or did I misuse "quopri" ?
msg1786 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2000-10-05 17:24
fixed in revision 1.7 of quopri
History
Date User Action Args
2022-04-10 16:02:28adminsetgithub: 33259
2000-10-03 12:47:04gilloucreate