You're trying to compare encoded text to unicode. Python doesn't know the encoded text is UTF-8, so it guesses it's ASCII and tries to decode it to unicode for you. The solution is to decode it explicitly with the proper encoding.
Check out the Python Unicode HOWTO for more info.
I can reproduce your problem with this file:
# coding: utf-8word = "öäå"if u"ö" in word: print True
And fix it with this file:
# coding: utf-8word = "öäå".decode('utf-8')if u"ö" in word: print True