Revert "Replace encoding override with improved stdio wrappers; use unicode_literals"

This reverts commit e03abccb175709324f740df4ba3cb49fe70e2b62.