Support handling unicode data in Python 2