Mark,

Following your recommendation on the IMAP mailing list, I have started using the imap-2004 c-client code, in particular to take advantage of the utf8_cstext function. I have found one bug in RC8 that needs some attention. The code concerned is in the utf8_rmap function:

    case CT_1BYTE:              /* 1 byte ASCII + table 0x80-0xff */
      for (tab = (unsigned short *) cs->tab,i = 128; i < 256; i++)
        if (tab[i] != UBOGON) rmap[tab[i]] = (unsigned short) i;
      break;

I believe this should be something like:

    case CT_1BYTE:              /* 1 byte ASCII + table 0x80-0xff */
      for (tab = (unsigned short *) cs->tab,i = 0; i < 128; i++)
        if (tab[i] != UBOGON) rmap[tab[i]] = (unsigned short) (i + 128);
      break;

I also came across something in imap-2002e that I think may be a problem and which is unchanged in RC8. That is that the [location] field of the BODY structure is never garbage collected.

Despite the problem, utf8_cstext is a godsend. Thank you so much.

Pete Maclean


--
------------------------------------------------------------------
For information about this mailing list, and its archives, see: http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

Reply via email to