unicode strings?!

Philipp Schmid schmidp at o000o.org
Thu Nov 8 07:42:48 EST 2001


hi,

can anyone help me with this little example program?

#!/usr/bin/python2

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