More charset parsing updates
This commit is contained in:
parent
1b9bb9deb4
commit
506a091e4c
@ -141,7 +141,7 @@ char *getrfcchrs(int val)
|
||||
case FTNC_LATIN_1: return (char *)"iso-8859-1";
|
||||
case FTNC_LATIN_2: return (char *)"iso-8859-2";
|
||||
case FTNC_LATIN_5: return (char *)"iso-8859-5";
|
||||
case FTNC_MAC: return (char *)"MAC 2";
|
||||
case FTNC_MAC: return (char *)"Macintosh";
|
||||
case FTNC_KOI8_R: return (char *)"koi8-r";
|
||||
case FTNC_CP936: return (char *)"hz-gb-2312";
|
||||
default: return (char *)"iso-8859-1";
|
||||
@ -465,6 +465,7 @@ int charset_set_in_out(char *in, char *out)
|
||||
if (strcasecmp(pa->alias, out) == 0)
|
||||
out = pa->name;
|
||||
}
|
||||
Syslog('m', "charset: aliases in=%s out=%s", in, out);
|
||||
|
||||
/* Search for matching table */
|
||||
for (pt = charset_table_list; pt; pt=pt->next) {
|
||||
|
@ -59,6 +59,7 @@ alias amiga iso-8859-1
|
||||
alias ibmpc cp437
|
||||
alias pc-8 cp437
|
||||
alias mac mac
|
||||
alias macinstosh mac
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
@ -253,12 +253,15 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
|
||||
//Griffin
|
||||
fmsg->reply_s = calloc(256,sizeof(char));
|
||||
findorigmsg(p,fmsg->reply_s);
|
||||
|
||||
if (findorigmsg(p, fmsg->reply_s)) {
|
||||
fmsg->to->name = calloc(strlen(Msg.From)+1, sizeof(char));
|
||||
strcpy(fmsg->to->name, Msg.From);
|
||||
Syslog('m', "fmsg to-name %s", fmsg->to->name);
|
||||
Syslog('m', "reply_s %s", fmsg->reply_s);
|
||||
} else {
|
||||
Syslog('m', "findorigmsg nothing found");
|
||||
}
|
||||
|
||||
if (!chkftnmsgid(p)) {
|
||||
hash_update_s(&fmsg->reply_n, fmsg->area);
|
||||
@ -318,6 +321,11 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
} else {
|
||||
charset = xstrcpy(q + 8);
|
||||
}
|
||||
/*
|
||||
* Sometimes more information follows so there the charset looks like iso-8859-1;
|
||||
*/
|
||||
if (charset[strlen(charset)-1] == ';')
|
||||
charset[strlen(charset)-1] = '\0';
|
||||
Syslog('m', "Charset \"%s\"", printable(charset, 0));
|
||||
}
|
||||
}
|
||||
|
@ -277,6 +277,11 @@ int rfc2ftn(FILE *fp)
|
||||
} else {
|
||||
charset = xstrcpy(q + 8);
|
||||
}
|
||||
/*
|
||||
* Sometimes more information follows so there the charset looks like iso-8859-1;
|
||||
*/
|
||||
if (charset[strlen(charset)-1] == ';')
|
||||
charset[strlen(charset)-1] = '\0';
|
||||
Syslog('m', "Charset \"%s\"", printable(charset, 0));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user