[Python-Dev] PEP 383 update: utf8b is now the error handler
Walter Dörwald
walter at livinglogic.de
Fri May 8 10:34:19 CEST 2009
Stephen J. Turnbull wrote:
> 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.
I like "surrogatetranslate" better than "surrogateescape" better than
"surrogatereplace".
But I'll stop bikesheding now and let Martin decide.
Servus,
alter
More information about the Python-Dev
mailing list