[Twisted-web] how to set charset of html page
Benjamin Ferrari
a9bejo at yahoo.de
Wed Sep 1 13:18:25 MDT 2004
Hello,
I just started with twisted, so I guess this is a very easy question:
I run a twisted.web server with mktap:
% mktap web --path /path/to/content
% twistd -nf web.tap
and then put a simple html page into the path folder:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>...</body>
unfortunately, browsers (tested with firefox 0.9.3 and IE6) completly
ignore the <meta/> tag and detect the page as UTF-8 instead of iso-8859-1.
with apache, I can set a default charset to use with
AddDefaultCharset iso-8859-1
How can I do that with the twisted server ?
Thanks for your help,
Benjamin
PS: I'm running twisted as a reverse proxy behind an apache2 server. Not
sure if that matters.
More information about the Twisted-web
mailing list