Fix python3 encoding issues (happens on some systems)