In <[EMAIL PROTECTED]>, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Marc 'BlackJack' > Rintsch wrote: > >> In <[EMAIL PROTECTED]>, >> Preben Randhol wrote: >> >>> Is there a way to calculate in characters >>> and not in bytes to represent the characters. >> >> Decode the byte string and use `len()` on the unicode string. > > Hmmm, for some reason > > len(u"C\u0327") > > returns 2.
Okay, decode and normalize and then use `len()` on the unicode string. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list