[Python-Dev] Minidom and Unicode

M.-A. Lemburg mal@lemburg.com
Tue, 04 Jul 2000 13:05:34 +0200


Paul Prescod wrote:
> 
> Fredrik Lundh wrote:
> >
> > ...
> >
> > exactly.  this is the whole point: __repr__ is a debug tool,
> > and therefore it must work in all platforms, for all strings.
> 
> As a debugging tool, it would probably help rather than hurt things to
> have repr be consistent on all platforms. If it is going to do a
> conversion, I vote for unicode-escape everywhere.

Ok, if you provide documentation for this, I'll give in on __repr__.

In any case, __str__ should use the default encoding.

> > on the other hand, if we can change repr/str, this is a non-
> > issue.  maybe someone could tell me exactly what code we'll
> > break if we do that change?
> 
> I agree that we want to move to a world where unicode strings and 8-bit
> strings are accepted equally throughout Python. We do need some
> information about whether moving there quickly will break code or not.
> We need to know what Idle, PythonWin, Zope and other such environments
> do with the results of repr.

Anybody care to test this ?

I think we should be careful about letting Unicode objects
go loose in environments which were not designed to work
with them.

Let's first start with polishing up the standard lib to
work with Unicode. It currently fails badly...

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