The *errors* parameter is the same as the parameter of the :meth:`~bytes.decode` method but supports a few more possible handlers. As well as ``'strict'``, ``'ignore'``, and ``'replace'`` (which in this case inserts a question mark instead of the unencodable character), there is also ``'xmlcharrefreplace'`` (inserts an XML character reference), ``backslashreplace`` (inserts a ``\uNNNN`` escape sequence) and ``namereplace`` (inserts a ``\N{...}`` escape sequence).