Fix encoding problem in python 3