if (mutt_is_utf8 (dest) ^ mutt_is_utf8(src))
size_t lf, lpu, lpo; char *t; DECODER *dec;  if (mutt_is_utf8 (dest) && !mutt_is_utf8 (src))
int mutt_recode_file (const char *fname, const char *src, const char *dest){  FILE *fp, *tmpfp;  char tempfile[_POSIX_PATH_MAX];  int c;  int rv = -1;    CHARSET_MAP *map;  if (mutt_is_utf8 (dest) ^ mutt_is_utf8(src))  {    mutt_error (_("We can't currently handle utf-8 at this point."));    return -1;  }  if ((fp = fopen (fname, "r+")) == NULL)  {    mutt_error (_("Can't open %s: %s."), fname, strerror (errno));    return -1;  }    mutt_mktemp (tempfile);  if ((tmpfp = safe_fopen (tempfile, "w+")) == NULL)  {    mutt_error (_("Can't open %s: %s."), tempfile, strerror (errno));    fclose (fp);    return -1;  }  map = mutt_get_translation (src, dest);    while ((c = fgetc (fp)) != EOF)    if (fputc (mutt_display_char ((unsigned char) c, map), tmpfp) == EOF)      goto bail;  fclose (fp); fp = NULL;  rewind (tmpfp);  /* don't use safe_fopen here - we're just going   * to overwrite the old file.   */  if ((fp = fopen (fname, "w")) == NULL)    goto bail;    while ((c = fgetc (tmpfp)) != EOF)    if (fputc (c, fp) == EOF)      goto bail;  rv = 0;  unlink (tempfile);  bail:  if (rv == -1)    mutt_error (_("Error while recoding %s. See %s for recovering your data."),		fname, tempfile);  if (fp) fclose (fp);  if (tmpfp) fclose (tmpfp);  return rv;}