Temporarily returning to the system encoding reset hack; work on unicode handling migration will continue in the python-encoding-migration branch