From a85a691cd1c246d0d768ef6bf8f69e82242e94b7 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Wed, 6 Nov 2002 13:39:39 +0000 Subject: [PATCH] Added charset= option SVN revision: 282 --- doc/config.html | 6 ++++++ elogd.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/config.html b/doc/config.html index e0519563..e93ce38f 100755 --- a/doc/config.html +++ b/doc/config.html @@ -111,6 +111,12 @@ The online help for elogd is contained in the file eloghe xx are the first two letters of the language (like "en", "ge" and "fr"). For new languages, a new file of that type must be created as well.

+

  • charset = <name> +
    +Specifies the charset of the pages produced by elogd. Can be used to switch to +Russian or Asian fonts. +

    +

  • Logbook Tabs = [0|1]
    This flag controls the display of "tabs" on top of the logbook page which diff --git a/elogd.c b/elogd.c index 4ad05680..05eba842 100755 --- a/elogd.c +++ b/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 2.96 2002/11/06 13:39:29 midas + Added charset= option + Revision 2.95 2002/11/06 08:59:18 midas Files can be specified with absolute path @@ -3556,9 +3559,16 @@ char str[1000]; void show_http_header() { +char str[256]; + rsprintf("HTTP/1.1 200 Document follows\r\n"); rsprintf("Server: ELOG HTTP %s\r\n", VERSION); - rsprintf("Content-Type: text/html\r\n"); + + if (getcfg("global", "charset", str)) + rsprintf("Content-Type: text/html;charset=%s\r\n", str); + else + rsprintf("Content-Type: text/html\r\n"); + rsprintf("Pragma: no-cache\r\n"); if (use_keepalive) {