[ python-Bugs-883466 ] quopri encoding & Unicode

SourceForge.net noreply at sourceforge.net
Mon Jan 26 15:38:51 EST 2004


Bugs item #883466, was opened at 2004-01-24 04:57
Message generated for change (Comment added) made by lemburg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=883466&group_id=5470

Category: Unicode
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Stuart Bishop (zenzen)
>Assigned to: Nobody/Anonymous (nobody)
>Summary: quopri encoding & Unicode

Initial Comment:
2.3 currently has the following behaviour:

>>> 'hello world'.encode('quopri')
'hello=20world'
>>> 'hello world'.encode('quopri').decode('quopri')
'hello world'
>>> u'hello world'.encode('quopri')
'=00h=00e=00l=00l=00o=00=20=00w=00o=00r=00l=00d'
>>> u'hello world'.encode('quopri').decode('quopri')
'\x00h\x00e\x00l\x00l\x00o\x00 \x00w\x00o\x00r\x00l\x00d'

I think the quoted printable encoding method should
either implicitly convert Unicode strings to US-ASCII,
or raise an exception.

----------------------------------------------------------------------

>Comment By: M.-A. Lemburg (lemburg)
Date: 2004-01-26 21:38

Message:
Logged In: YES 
user_id=38388

A change to StringIO/cStringIO would be needed to change this,
unless you want to add a special case to the codec testing
for Unicode.

I don't have time to look into this, sorry.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=883466&group_id=5470



More information about the Python-bugs-list mailing list