def str_to_unicode(s, encoding):
    if isinstance(s, str):
        return unicode(s, encoding, 'replace')
    else:
        return s
The XEP-0203 format is used over later legacy XEP-0091 format.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/http/__init__.py/str_to_unicode--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_delay.py/DelayMixinTest.test_fromParentElementBothLegacyLast