How to fix encoding in Python Mechanize?
问题 here is the sample code: from mechanize import Browser br = Browser() page = br.open('http://hunters.tclans.ru/news.php?readmore=2') br.form = br.forms().next() print br.form The problem is that server return incorrect encoding (windows-cp1251). How can I manually set the encoding of the current page in mechanize? Error: Traceback (most recent call last): File "/tmp/stackoverflow.py", line 5, in <module> br.form = br.forms().next() File "/usr/local/lib/python2.6/dist-packages/mechanize/