[issue10087] HTML calendar is broken
report at bugs.python.org
Sun Aug 7 03:40:12 CEST 2011
Chris Lambacher <chris at kateandchris.net> added the comment:
Senthil: I think that would fundamentally make things worse. The HTML calendar apparently always provides a bytes type, but lets assume it provided you with unicode and we used sys.stdout.write on the output. Fundamentally you would get the same behavior as the patch provides since if you don't provide an encoding it uses sys.getdefaultencoding() which, IIUC is fundamentally what happens if you sys.stdout.write a unicode string.
Ezio: I think it is highly unlikely that someone would be fiddling around with sys.stdout and then calling the main() function on calendar.main() (after setting up sys.args so that option parser gets the right parameters).
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list