[Python-Dev] Minidom and Unicode

M.-A. Lemburg mal@lemburg.com
Mon, 03 Jul 2000 18:39:52 +0200

Paul Prescod wrote:
> "M.-A. Lemburg" wrote:
> >
> > ...
> >
> > I think it's ok to auto-convert to the default encoding
> > as intermediate solution, but the applications wanting to
> > return Unicode as __repr__ or __str__ should really
> > use .encode() to make sure the output that is produces
> > matches their (or their user's) expectations.
> If my users have expectations, I don't know them. I could allow them to
> tell me what encoding to use, but surely they would rather do that in a
> Python-wide fashion.

They can choose the encoding by setting their LANG variable
or you could make the setting application specific by using
.encode where needed.

BTW, are tag names using non-ASCII really used in practice ?
I can understand values being Unicode, but Unicode
tag names don't really make all that much sense to me (ok,
that's a personal opinion).

Marc-Andre Lemburg
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/