The problem seems to be that gtkhtml2.Document.open_stream() doesn't
handle a Content-type with a charset specified. http://www.gnome.org/
has a Content-type of "text/html; charset=utf-8". The following hack
resolves the problem, but it should be done better:
--- /usr/share/doc/python-gnome2-extras/examples/gtkhtml2/simple-browser.py
2002-04-30 02:02:20.000000000 +0100
+++ simple-browser.py 2006-10-03 18:41:07.000000000 +0100
@@ -38,6 +38,7 @@
headers = f.info()
mime = headers.getheader('Content-type')
if mime:
+ if mime.find(';') != -1: mime = mime.split(';')[0]
document.open_stream(mime)
else:
document.open_stream('text/plain')
--
simple-browser.py example doesn't work
https://launchpad.net/bugs/63804
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs