[Python-Dev] PEP 383 update: utf8b is now the error handler
Stephen J. Turnbull
stephen at xemacs.org
Thu May 7 20:20:59 CEST 2009
Walter Dörwald writes:
> "surrogatepass" (for the "don't complain about lone half surrogates"
> handler) and "surrogatereplace" sound OK to me. However the other
> "...replace" handlers are destructive (i.e. when such a "...replace"
> handler is used for encoding, decoding will not produce the original
> unicode string).
That doesn't bother me in the slightest. "Replace" does not connote
"destructive" or "non-destructive" to me; it connotes "substitution".
The fact that other error handlers happen to be destructive doesn't
affect that at all for me. YMMV.
> The purpose of the PEP 383 error handler however is to be roundtrip
> safe, so maybe we should choose a slightly different name? How
> about "surrogateescape"?
To me, "escape" has a strong connotation of a multicharacter
representation of a single character, and that's not true here.
How about "surrogatetranslate"? I still prefer "surrogatereplace", as
it's slightly easier for me to type.
More information about the Python-Dev
mailing list