diferences between 22 and python 23

Serge Orlov sombDELETE at pobox.ru
Mon Dec 8 01:01:09 CET 2003


Bengt,

don't take it personally but this what happens <wink> when you use unicode
unaware software:
Quote from your message:
> martin at v.loewis.de (Martin v. =?iso-8859-15?q?L=F6wis?=) wrote:

Your software also doesn't specify message encoding.

The real issue is to convince developers that there are many encodings in
this world. Python should offer only one way to deal with multiple encodings.
Your 8-bit strings with attached coding attribute is duplicating what unicode
strings offer.

> >> If e.g. name had latin-1 encoding associated with it by virtue of source like
> >>     ...
> >>     # -*- coding: latin-1 -*-
> >>     name = 'Martin Lowis'
> >>
> >> then on my cp437 console window, I might be able to expect to see the umlaut
> >> just by writing
> >>
> >>     print name
> >
> >I see. To achieve this effect, do
> >
> ># -*- coding: latin-1 -*-
> >name = u'Martin Lowis'
> >print name
> Right, but that is a workaround w.r.t the possibility I am trying to discuss.

It's not a workaround it's a solution. What you propose is a lot of effort for
a little gain wrt handling multiple encoding. It's already possible to handle
multiple encoding. The time is better spent converting everything that still
deals with 8-bit text to handle unicode.

-- Serge.






More information about the Python-list mailing list