def METHOD_NAME(value):
    encoded = unicode(value, 'utf-8', 'replace')
    for ch in encoded:
        try:
            _ = unicodedata.name(ch)
        except ValueError:
            # Mangled Unicode code-point. Perhaps this is just
            # plain ISO-8859-1 data incorrectly reported as UTF-8.
            return unicode(value, 'iso-8859-1', 'replace')
    return encoded