Namazu-devel-ja(旧)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overview of Changes in Namazu 2.0.6 (draft) -Jun 25, 2001
On Tue, 26 Jun 2001 10:29:05 JST
knok@xxxxxxxxxxxxx (NOKUBI Takatsugu) wrote:
> もう2つ、BTS を close したもので。NEW にも追加しておきました。
(snip)
> * Added ContentType directive in namazurc.
> (namazu-bugs-ja#34)
>
> # chaset 問題も 2.2 に先送りですかね...
gettextを使ってcharsetを切替える方法でいいのであれば、
以下のようなパッチでよさそうな気がしますけど、どう
でしょう?
--- src/output.c.bak Tue Jun 26 13:58:10 2001
+++ src/output.c Tue Jun 26 15:03:42 2001
@@ -73,6 +73,7 @@
static char emphasis_start_tag[BUFSIZE] = "<strong class=\"keyword\">";
static char emphasis_end_tag[BUFSIZE] = "</strong>";
char contenttype[BUFSIZE] = "text/html";
+static char content_charset[BUFSIZE] = N_("; charset=US-ASCII");
/*
*
@@ -668,7 +669,7 @@
{
if (is_htmlmode() && is_cgimode()) {
- printf("%s %s" CRLF CRLF, MSG_MIME_HEADER, contenttype);
+ printf("%s %s%s" CRLF CRLF, MSG_MIME_HEADER, contenttype,
_(content_charset));
}
if (is_htmlmode()) {
@@ -758,7 +759,7 @@
void
print_default_page (void) {
if (is_htmlmode()) {
- printf("%s %s" CRLF CRLF, MSG_MIME_HEADER, contenttype);
+ printf("%s %s%s" CRLF CRLF, MSG_MIME_HEADER, contenttype,
_(content_charset));
print_headfoot(NMZ.head, "", "");
print_msgfile(NMZ.body);
print_headfoot(NMZ.foot, "", "");
@@ -941,7 +942,7 @@
fflush(stderr);
if (is_cgimode()) {
- printf("%s %s" CRLF CRLF, MSG_MIME_HEADER, "text/html");
+ printf("%s %s%s" CRLF CRLF, MSG_MIME_HEADER, "text/html",
_(content_charset));
printf(_("<h2>Error</h2>\n<p>"));
va_start(args, fmt);
vprintf(fmt, args);
A A
= . . =
V
end
Ryuji Abe