Eliminate use of nosetests, which has i18n bugs
Use encoding from locale (it seems to be absent as a stream attribute sometimes)
Remove debug statements that trigger encoding errors