I'm having problems replacing text in a unicode string. Here's the code: # -*- coding: cp1252 -*-
titel = unicode("�", "iso-8859-1")
print titel
print type(titel)
titel.replace("�", "a")
When i run this program I get this error:
titel.replace("�", "a")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0:
ordinal not in range(128)
How can i replace text in the Unicode string?
--
http://mail.python.org/mailman/listinfo/python-list
