Fallback to CP437

This commit is contained in:
Michiel Broek 2007-03-01 20:02:34 +00:00
parent 2df7a90122
commit 902a3e96ce

View File

@ -182,16 +182,13 @@ void command_abhs(char *buf)
} }
} while ((p = (char *)MsgText_Next()) != NULL); } while ((p = (char *)MsgText_Next()) != NULL);
} }
Syslog('n', "1 charset=\"%s\"", printable(charset, 0));
if (charset == NULL) { if (charset == NULL) {
if (msgs.Charset != FTNC_NONE) { /*
charset = xstrcpy(getftnchrs(msgs.Charset)); * Missing CHRS kludge, must be an ancient DOS program that
} else if (usercharset != FTNC_NONE) { * created this message.
charset = xstrcpy(getftnchrs(msgs.Charset)); */
} else { charset = xstrcpy((char *)"CP437");
charset = xstrcpy((char *)"CP437");
}
} }
Syslog('n', "2 charset=\"%s\"", printable(charset, 0)); Syslog('n', "2 charset=\"%s\"", printable(charset, 0));
@ -204,7 +201,7 @@ void command_abhs(char *buf)
if ((strcasecmp(cmd, "ARTICLE") == 0) || (strcasecmp(cmd, "HEAD") == 0)) { if ((strcasecmp(cmd, "ARTICLE") == 0) || (strcasecmp(cmd, "HEAD") == 0)) {
send_nntp("Path: MBNNTP!not-for-mail"); send_nntp("Path: MBNNTP!not-for-mail");
send_nntp("From: %s <%s>", Msg.From, Msg.FromAddress); send_nntp("From: %s <%s>", chartran(Msg.From), Msg.FromAddress);
send_nntp("Newsgroups: %s", currentgroup); send_nntp("Newsgroups: %s", currentgroup);
asprintf(&subj,"Subject: %s", Msg.Subject); asprintf(&subj,"Subject: %s", Msg.Subject);
send_xlat(subj); send_xlat(subj);
@ -216,10 +213,6 @@ void command_abhs(char *buf)
/* /*
* Send RFC 2045 Multipurpose Internet Mail Extensions (MIME) header. * Send RFC 2045 Multipurpose Internet Mail Extensions (MIME) header.
* Order is: 1. Charset defined in the FTN message
* 2. Charset of the message area
* 3. Charset of the user
* 4. Default us-ascii.
*/ */
send_nntp("MIME-Version: 1.0"); send_nntp("MIME-Version: 1.0");
send_nntp("Content-Type: text/plain; charset=utf-8"); send_nntp("Content-Type: text/plain; charset=utf-8");