Don't use "half" as an adjective to "surrogate".

This commit is contained in:
Martin v. Löwis 2009-05-05 21:01:44 +00:00
parent 950c2600cc
commit 5dd402c72d
1 changed files with 5 additions and 5 deletions

View File

@ -69,14 +69,14 @@ environmental data to Python str objects ([1]).
On POSIX systems, Python currently applies the locale's encoding to On POSIX systems, Python currently applies the locale's encoding to
convert the byte data to Unicode, failing for characters that cannot convert the byte data to Unicode, failing for characters that cannot
be decoded. With this PEP, non-decodable bytes >= 128 will be be decoded. With this PEP, non-decodable bytes >= 128 will be
represented as lone half surrogate codes U+DC80..U+DCFF. Bytes below represented as lone surrogate codes U+DC80..U+DCFF. Bytes below
128 will produce exceptions; see the discussion below. 128 will produce exceptions; see the discussion below.
To convert non-decodable bytes, a new error handler ([2]) "utf8b" is To convert non-decodable bytes, a new error handler ([2]) "utf8b" is
introduced, which produces these half surrogates. On encoding, the introduced, which produces these surrogates. On encoding, the error
error handler converts the half surrogate back to the corresponding handler converts the surrogate back to the corresponding byte. This
byte. This error handler will be used in any API that receives or error handler will be used in any API that receives or produces file
produces file names, command line arguments, or environment variables. names, command line arguments, or environment variables.
The error handler interface is extended to allow the encode error The error handler interface is extended to allow the encode error
handler to return byte strings immediately, in addition to returning handler to return byte strings immediately, in addition to returning