db wrote:
> Hello all,
> 
> I hope this is the correct newsgroup for this question.
> 
> Does anybody know how I can write a html-header with python(cgi)? 
> The problem is, I have a few html templates in which I have a header e.g:
> 
> <!DOCTYPE  HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
> "http://www.w3.org/TR/html4/strict.dtd";>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

If you are using CGI you can set the Content-Type header directly. Before you 
output your HTML do
print "Content-Type: text/html; charset=UTF-8"
print  # blank line, end of headers

Kent
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to