[I18n-sig] Unicode implementation of python

Martin v. Loewis martin@v.loewis.de
01 Aug 2002 18:58:25 +0200


"Taquin Ho" <taquin.ho@projectplace.com> writes:

> Thanks, I know, but the standard version does not seem to have all
> the unicode build.

It sure does have Unicode support.

> site.py gives an attribute error when it tries to execute
> sys.setdefaultencoding(...).

Why do you say that? Because the comment says it, or because you
actually did get the attribute error when changing site.py?

> See code from site.py:
>    if encoding != "ascii":
>        # On Non-Unicode builds this will raise an AttributeError...
>        sys.setdefaultencoding(encoding) # Needs Python Unicode build !

I'm pretty sure that you got this exception because you tried to
invoke sys.setdefaultencoding outside of site.py

> Once again, anyone know how to activate the unicode support, without
> having to do an x.encode('latin-1') manually for each string?

It is already activated. Please explain *exactly* what you did if you
want more help.

Regards,
Martin