[Python-3000] Displaying strings containing unicode escapes
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Apr 17 04:07:56 CEST 2008
Nick Coghlan wrote:
> Unfortunately, it turns out that the trick also breaks display of
> strings containing any other escape codes.
There's also the worry that it could trigger falsely
on something that happened to look like \uxxxx but
didn't originate from the repr of a unicode char.
> I'm still
> reasonably convinced that the issue of Unicode escapes for non-ASCII
> users is best attacked as a display problem
It can only ever be a heuristic, though, not an
exact solution, since there isn't enough information
left by the time it's a string to undo the escaping
correctly in all cases.
I'm currently thinking there are too many use cases
overloaded onto repr() at the moment.
--
Greg
More information about the Python-3000
mailing list