UTF-8 fix for Python 2; fixed test