Send Accept-Charset headers to let Zope process non-ascii charsets in Zuite results

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35122 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 158ed5bc
......@@ -130,7 +130,11 @@ class FunctionalTestRunner:
self.portal_url = "http://%s:%d/%s" % (self.host, self.port, self.portal_name)
def openUrl(self, url):
f = urllib2.urlopen(url)
# Send Accept-Charset headers to activate the UnicodeConflictResolver
# (imitating firefox 3.5.9 here)
headers = { 'Accept-Charset' : 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' }
request = urllib2.Request(url, headers=headers)
f = urllib2.urlopen(request)
file_content = f.read()
f.close()
return file_content
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment