def str_to_unicode(s, encoding):
    if isinstance(s, str):
        return unicode(s, encoding, 'replace')
    else:
        return s
Converts basestring objects to unicode, using the given encoding. Illegally
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.3/django/http/__init__.py/str_to_unicode