diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-01-05 14:35:11 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-01-05 14:35:11 +0000 |
commit | 4a3e38f09949c92947e227122e227ef311a1e170 (patch) | |
tree | 7952c23bdba7a5a6c87bac5cbdc13a6c05364063 /sendlib.c | |
parent | 6033893cb58a49f3bcada5caa84ab4ffed08d534 (diff) |
[unstable] Adding experimental new character set conversion code.
Diffstat (limited to 'sendlib.c')
-rw-r--r-- | sendlib.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -554,7 +554,6 @@ static CONTENT *mutt_get_content_info (const char *fname) { CONTENT *info; FILE *fp; - CHARSET_MAP *cm; int ch, from=0, whitespace=0, dot=0, linelen=0; if ((fp = fopen (fname, "r")) == NULL) @@ -564,12 +563,6 @@ static CONTENT *mutt_get_content_info (const char *fname) return (NULL); } - { - CHARSET *cs; - - cm = (cs = mutt_get_charset(Charset)) ? cs->map : 0; - } - info = safe_calloc (1, sizeof (CONTENT)); while ((ch = fgetc (fp)) != EOF) { @@ -642,8 +635,7 @@ static CONTENT *mutt_get_content_info (const char *fname) if (ch == ' ') whitespace++; info->ascii++; } - if (cm && mutt_unicode_char (cm, ch) & -128) - info->nonasc = 1; + if (linelen > 1) dot = 0; if (ch != ' ' && ch != '\t') whitespace = 0; } @@ -748,15 +740,11 @@ static int lookup_mime_type (char *d, const char *s) static char *set_text_charset (CONTENT *info) { - CHARSET *cs; - - /* if charset is unknown assume low bytes are ascii compatible */ - if ((Charset == NULL || mutt_strcasecmp (Charset, "us-ascii") == 0) && info->hibin) return ("unknown-8bit"); - if (((cs = mutt_get_charset (Charset)) && cs->map) ? info->nonasc : info->hibin) + if (info->hibin) return (Charset); return ("us-ascii"); |