How does unicode() work?

Robert Latest boblatest at yahoo.com
Wed Jan 9 07:33:42 EST 2008


Here's a test snippet...

import sys
for k in sys.stdin:
    print '%s -> %s' % (k, k.decode('iso-8859-1'))

...but it barfs when actually fed with iso8859-1 characters. How is this 
done right?

robert



More information about the Python-list mailing list