Bugs item #1241507, was opened at 2005-07-20 12:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1241507&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Graham Horler (grahamh)
Assigned to: Nobody/Anonymous (nobody)
Summary: StreamReader broken for byte string to byte string codecs

Initial Comment:
print sys.version
2.4.1 (#2, Jul 12 2005, 09:22:25)
[GCC 4.0.1 (Debian 4.0.1-1)]

Decoding to what (according to the documentation)
should be a byte string (using StreamReader) does one
of 2 incorrect things, depending on the default encoding:

1) If the byte string has values not in the current
default encoding then StreamReader.read() incorrectly
triggers an exception.

2) If the byte string can be accomodated by the current
default encoding then StreamReader.read() incorrectly
returns a unicode object.

The documentation says in lib/standard-encodings.html:
  "The result of the ``decoding'' direction is listed
as operand type in the table."
  "base64_codec ... byte string"

(This bug does not exist in python2.2 or 2.3)

The attached script demonstrates the 2 related bugs.

Many thanks,
Graham

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1241507&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to