mirror of
https://github.com/python/cpython.git
synced 2025-10-14 10:53:40 +00:00
Note that unicode() can raise LookupError for unknown codecs.
Closes SF bug #513666.
This commit is contained in:
parent
eab5f8a43d
commit
4254cbd29c
1 changed files with 2 additions and 1 deletions
|
@ -859,7 +859,8 @@ def my_import(name):
|
|||
If \var{encoding} and/or \var{errors} are given, \code{unicode()}
|
||||
will decode the object which can either be an 8-bit string or a
|
||||
character buffer using the codec for \var{encoding}. The
|
||||
\var{encoding} parameter is a string giving the name of an encoding.
|
||||
\var{encoding} parameter is a string giving the name of an encoding;
|
||||
if the encoding is not known, \exception{LookupError} is raised.
|
||||
Error handling is done according to \var{errors}; this specifies the
|
||||
treatment of characters which are invalid in the input encoding. If
|
||||
\var{errors} is \code{'strict'} (the default), a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue