[Python-3000] PEP 3138- String representation in Python 3000
Nick Coghlan
ncoghlan at gmail.com
Fri May 16 00:56:44 CEST 2008
Paul Moore wrote:
> On 15/05/2008, Atsuo Ishimoto <ishimoto at gembook.org> wrote:
>> I would like to call it "improve", not break :)
>
> Please can you help me understand the impact here. I am running
> Windows XP (UK English - console code page 850, which is some variety
> of Latin 1). Currently, printing non-latin1 characters gives me an
> exception: for example,
As Oleg and Atsuo already pointed out, this is addressed in the PEP by
switching the encoding error mode on sys.stderr and sys.stdout to
backslashreplace instead of the current strict.
So not only will repr() still display correctly for you, all other
strings containing Unicode characters will start displaying as well
(with Unicode escapes in place of the glyphs your display can't cope with).
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-3000
mailing list