'Decode it as an escaped string and then treate the content as
UTF-8 encoded.'

def _safe_decode(self, encoded):

    try:
        if encoded:
            (unescaped, _ign) = codecs.escape_decode(encoded)
            return unescaped.decode('utf-8')
        return encoded
    except Exception:
        return encoded
