What do I have to do in Python to figure out which encoding a string has?
For py2/py3 compatibility simply use 

import six
if isinstance(obj, six.text_type)
How do I check if a string is unicode or ascii?