raw_input() and utf-8 formatted chars

7stud bbxx789_05ss at yahoo.com
Fri Oct 12 14:53:25 EDT 2007


s = 'A\xcc\x88'   #capital A with umlaut
print s           #displays capital A with umlaut

s = raw_input('Enter: ')   #A\xcc\x88
print s                    #displays A\xcc\x88

print len(input)           #9


It looks like every character of the string I enter in utf-8 is being
interpreted literally as 9 separate characters rather than one
character.  How do I enter a capital A with an umlaut so that python
treats it as one character?




More information about the Python-list mailing list