def decode(input, fallback_encoding, errors='<STR_LIT:replace>'):
<EOL>fallback_encoding = _get_encoding(fallback_encoding)<EOL>bom_encoding, input = _detect_bom(input)<EOL>encoding = bom_encoding or fallback_encoding<EOL>return encoding.codec_info.decode(input, errors)[<NUM_LIT:0>], encoding<EOL>
Decode a single string.

:param input: A byte string
:param fallback_encoding:
    An :class:`Encoding` object or a label string.
    The encoding to use if :obj:`input` does note have a BOM.
:param errors: Type of error handling. See :func:`codecs.register`.
:raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
:return:
    A ``(output, encoding)`` tuple of an Unicode string
    and an :obj:`Encoding`.