fix handling of special characters when using Python 3
Merge pull request #80 from dirk-thomas/master

fix handling of special characters when using Python 3