Attempt to solve encoding problems in Python 3