[Python-Dev] Python-3.0, unicode, and os.environ

Michael Urman murman at gmail.com
Sun Dec 7 19:18:19 CET 2008


On Sun, Dec 7, 2008 at 11:35, Adam Olsen <rhamph at gmail.com> wrote:
>>> http://bugs.python.org/issue3672
>>> http://bugs.python.org/issue3297
>
> No.  Unicode *requires* them to be treated as errors.  If you want to
> pass them through then you're creating a custom encoding... which you
> might argue for in this case, but it needs to be clearly separate from
> the real UTF-8.

I suspect it is a common and convenient but (according to what you
say) misconceived expectation that using UTF-8 to encode any Unicode
string will not raise an exception. This behavior is not something
which should be discarded lightly.

I see little reason that this couldn't be a new codec or error handler
that allowed people to choose between correct pure UTF-8 behavior or
the technically incorrect but very practical behavior it currently
has.

[My apologies, Adam, for sending this only to you the first time]
-- 
Michael Urman


More information about the Python-Dev mailing list