[Python-Dev] Relaxing Unicode error handling

M.-A. Lemburg mal at egenix.com
Wed Jan 7 05:35:42 EST 2004


Martin v. Loewis wrote:
> M.-A. Lemburg wrote:
> 
>> Hmm, I would assume that application authors do have the
>> proper permissions to use the work-around I mentioned
>> below, that is, add sitecustomize.py to their application
>> as top-level module and change the default encoding to
>> use their custom codec instead.
> 
> But that would interfere with a sitecustomize.py already
> present on the system.

Possibly, yes, provided the site uses sitecutomize.py.

>> Then again, if you only change the ASCII codec, you wouldn't
>> have to change these hard coded "strict" values.
> 
> Why not? If the argument parser invokes the default encoding,
> and passes "strict", then this would override the default
> error handling of the codec, no?

No, because if you override the errors argument in the ASCII
codec alone (and depending on the switch you introduce),
there's no need to change anything in the system at all to
have an enabled switch silence the errors.

What do you think ? Wouldn't that be a solution to what
you are trying to achieve ?

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jan 06 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the Python-Dev mailing list