diff --git a/pep-0383.txt b/pep-0383.txt index 5fe77cd5e..e7bf8c7f9 100644 --- a/pep-0383.txt +++ b/pep-0383.txt @@ -74,7 +74,8 @@ lone half surrogate codes U+DCxx. To convert non-decodable bytes, a new error handler "python-escape" is introduced, which produces these half surrogates. On encoding, the error handler converts the half surrogate back to the corresponding -byte. +byte. This error handler used used in any API that receives or produces +file names, command line arguments, or environment variables. The error handler interface is extended to allow the encode error handler to return byte strings immediately, in addition to returning @@ -119,7 +120,7 @@ for accepting and returning bytes, would be written as:: dirname = dirname.decode(fse, "python-escape") for fn in os.listdir(dirname): # fn is now a str object - yield fn.encode(fse, "python-escape" + yield fn.encode(fse, "python-escape") Copyright =========