Normalize a polish L

Peter Bengtsson peterbe at gmail.com
Mon Oct 15 12:33:26 EDT 2007


In UTF8, \u0141 is a capital L with a little dash through it as can be
seen in this image:
http://static.peterbe.com/lukasz.png

I tried this:
>>> import unicodedata
>>> unicodedata.normalize('NFKD', u'\u0141').encode('ascii','ignore')
''

I was hoping it would convert it it 'L' because that's what it
visually looks like. And I've seen it becoming a normal ascii L before
in other programs such as Thunderbird.

I also tried the other forms: 'NFC', 'NFKC', 'NFD', and 'NFKD' but
none of them helped.

What am I doing wrong?




More information about the Python-list mailing list