Unicode and default encodings

Boudewijn Rempt boud at rempt.xs4all.nl
Mon Dec 18 01:24:31 EST 2000


Fredrik Lundh <fredrik at effbot.org> wrote:
> Boudewijn Rempt wrote:
>> I'm currently trying to work with Unicode strings, and
>> I was kind of wondering where sys.setdefaultencoding has
>> gone to - it's still mentioned in Misc/unicode.txt, but
>> it isn't there anymore ;-)

> You can use it in sitecustomize.py, but not in user code.
> See Lib/site.py for details.

Do I understand correctly then that there is no way to set a default
encoding per application? I mean, most of my users will live their
lives in latin1 land, but the application is meant to handle unicode
data exclusively.

Phil Thompson suggest sneakily keeping a reference to setdefaultencoding
from sitecustomize.py, but I keep wondering why I would need to do
something so hackish.


-- 

Boudewijn Rempt  | http://www.valdyas.org



More information about the Python-list mailing list