Added python2 utf-8 support to the python backend