why isn't Unicode the default encoding?

Jan Niklas Fingerle usenet-2004 at lithe.de
Mon Mar 20 15:17:25 EST 2006


John Salerno <johnjsal at nospamgmail.com> wrote:
> to convert back and forth. But why isn't Unicode considered a regular 
> string by now? Is it for historical reasons that we still use ASCII and 
> Latin-1? 

The point is, that, with a regular string, you don't know its encoding
or whether it has an encoding at all - it might as well be just a byte
buffer. The best thing would be to have byte buffer and a unicode string
type but, this can't happen as long as you don't want to break existing
code.

> Why can't Unicode replace them so we no longer need the 'u' 
> prefix or the encoding tricks?

It's proposed for python 3000 (http://www.python.org/doc/peps/pep-3000/)
and I think it will make it into the language. 

Cheers,
  --Jan Niklas



More information about the Python-list mailing list