Fix  Python 2/3 encoding issue #788