From 10921eba21e8e74d086854e1e361c381e4661eda Mon Sep 17 00:00:00 2001 Message-Id: <10921eba21e8e74d086854e1e361c381e4661eda.1714087148.git.mdw@distorted.org.uk> From: Mark Wooding Date: Mon, 23 Jun 2008 23:07:46 +0100 Subject: [PATCH] Web interface now advertizes UTF-8 as a charset. This is a workaround for its current failure to SGML-quote non-ASCII characters correctly, but is probably the most sensible choice anyway. Organization: Straylight/Edgeware From: Richard Kettlewell --- cgi/actions.c | 2 +- cgi/cgimain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cgi/actions.c b/cgi/actions.c index 611e9a4..a139eaf 100644 --- a/cgi/actions.c +++ b/cgi/actions.c @@ -745,7 +745,7 @@ void dcgi_expand(const char *name, int header) { if(!(found = mx_find(p, 0/*report*/))) fatal(errno, "cannot find %s", p); if(header) { - if(printf("Content-Type: text/html\n" + if(printf("Content-Type: text/html; charset=UTF-8\n" "%s\n" "\n", dcgi_cookie_header()) < 0) fatal(errno, "error writing to stdout"); diff --git a/cgi/cgimain.c b/cgi/cgimain.c index 253f82e..e96bbab 100644 --- a/cgi/cgimain.c +++ b/cgi/cgimain.c @@ -33,7 +33,7 @@ int main(int argc, char **argv) { /* TODO we could make disorder/ACTION equivalent to disorder?action=ACTION */ if(getenv("PATH_INFO")) { /* TODO it might be nice to link back to the right place... */ - printf("Content-Type: text/html\n"); + printf("Content-Type: text/html; charset=UTF-8\n"); printf("Status: 404\n"); printf("\n"); printf("

Sorry, PATH_INFO not supported.

\n"); -- [mdw]