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

M.-A. Lemburg mal at egenix.com
Mon Dec 8 22:01:40 CET 2008


On 2008年12月08日 21:45, Antoine Pitrou wrote:
> M.-A. Lemburg <mal <at> egenix.com> writes:
>> Such application specific error handlers could then also apply
>> whatever fancy round-trip safe encoding of non-decodable bytes
>> to Unicode escapes, private code points, etc. as seen fit by the
>> application.
>> I'd argue that such fancy round-trip safe error handler should be provided by
> Python. It's not reasonable to expect application coders to come up with their
> own codec variation based on subtle details of the unicode spec.

Fair enough. We could add some e.g.
 * a round-trip safe escape error handler that uses a Unicode private
 code point area which we officially reserve for the Python
 interpreter
 * a human readable escape error handler that encodes the problem
 bytes to say hex escapes, e.g. gives Andr\xe9 for a Latin-1
 encoded directory name instead of failing
 * a warning error handler that replaces the problem cases with
 a question mark and issues a warning through the warning
 framework
-- 
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Dec 08 2008)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2008年12月02日: Released mxODBC.Connect 1.0.0 http://python.egenix.com/
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

 eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
 Registered at Amtsgericht Duesseldorf: HRB 46611
 http://www.egenix.com/company/contact/


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /