[issue1444] utf_8_sig streamreader bug, patch, and test

James G. sack (jim) report at bugs.python.org
Fri Nov 16 05:50:10 CET 2007


James G. sack (jim) added the comment:

I found the errror in my previous patch. It lacked a self.decode=.. line 
in the StreamReader.decode elif branch. 

I attach a replacement patch diff-u.py26_utf8sig (apply to the 2.6 version 
of utf_8_sig.py. (If allowed, I will next remove the incorrect patch.)

This one passes test_codecs.py as well as my previously attached test 
module.

The resulting utf_8_sig.py may benefit from further refctoring, but I 
didn't want to do more than necessary to fix the immediate bug.

Regards,
..jim

Added file: http://bugs.python.org/file8764/diff-u.py26_utf8sig

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1444>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff-u.py26_utf8sig
Type: application/octet-stream
Size: 1020 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-bugs-list/attachments/20071116/d25639e9/attachment.obj 


More information about the Python-bugs-list mailing list