unicode - How do I case fold a string in Python 2? -
python 3.3 adds casefold method str type, in 2.x don't have anything. what's best way work around this?
check out py2casefold.
>>> py2casefold import casefold >>> print casefold(u"tschüß") tschüss >>> casefold(u"ΣίσυφοςfiÆ") == casefold(u"ΣΊΣΥΦΟσfiæ") == u"σίσυφοσfiæ" true
Comments
Post a Comment