I wrote script that find expressions in web page:
import sre, urllib2, sys, BaseHTTPServer # -*- coding: utf-8 -*- address = sys.argv[1] web_handle = urllib2
You need to ensure that the input string is also in UTF8 format.
Use unicode function with utf-8 as second argument:
unicode
utf-8
website_text = unicode(website_text, "utf-8")
Everything should be in consistent encoding for unicode to work in Python 2.