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/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4