[Mailman-i18n] "Funny" characters in real names?

Martin v. Löwis loewis@informatik.hu-berlin.de
18 Sep 2002 08:08:06 +0200


barry@python.org (Barry A. Warsaw) writes:

>     BG> Again, I assume you mean ISO-8859-1 instead of ascii here.
> 
> Same thing here.  We do name.encode('us-ascii') and catch any
> UnicodeError that might occur.  

That should be name.decode, or unicode(name, "us-ascii"). name.encode
unfortunately works as well, but it first decodes using the system
default encoding, then encodes using us-ascii - very close to what you
want, but not the precise same thing.

Regards,
Martin