fix encoding in Python 2