unicode strings?!

Philipp Schmid schmidp at o000o.org
Thu Nov 8 13:42:48 CET 2001


can anyone help me with this little example program?


lala = "aslfjaslkjf lasjflasjkfals faslkfj aljfaöljfkalöfjalö jflajf"
print lala
lala = u'%s' % lala
print lala

if i run it I get the following error, why?

aslfjaslkjf lasjflasjkfals faslkfj aljfaöljfkalöfjalö jflajf
Traceback (most recent call last):
  File "./test.py", line 5, in ?
    lala = u'%s' % lala
UnicodeError: UTF-8 decoding error: invalid data

thx philipp

The Macintosh way is to organize things by things the users do, not the 
underlying file system. This is a HUGE paradigm shift from the Unix 
(everything is a file) paradigm, and from the Microsoft (everything is 
about something).

More information about the Python-list mailing list