ignore_case working?

David Relson relson at osagesoftware.com
Fri May 23 22:39:05 CEST 2003


At 04:18 PM 5/23/03, W M Brelsford wrote:
>On Thu May 22 2003 at 07:51 PM -0700, W M Brelsford wrote:
> > After using 0.13.0 for a while I find no upper-case letters in
> > the db files (other than .MSG_COUNT, of course).  I'm not setting
> > ignore_case in bogofilter.cf, so it should be off by default.
> > Header line markup is working, however.  Is it just me..?
>
>It appears that bogolexer puts out only lower-case tokens when
>
>         replace_nonascii_characters=Y
>
>appears in /etc/bogofilter.cf -- apparently a conflict of options..?

Bill,

Good detective work!  When replace_nonascii_characters is enabled, the 
routine for setting the character map, a.k.a. casefold_table, was also 
setting up for upper to lower.  It should not be doing that at all.  Below 
is the patch.

I'll build it into 0.13.2 tomorrow.  I want to see what other problems 
appear in 0.13.0 and 0.13.1.

Thanks for reporting the problem.

David

Index: charset.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/src/charset.c,v
retrieving revision 1.3
diff -u -r1.3 charset.c
--- charset.c   18 May 2003 18:57:12 -0000      1.3
+++ charset.c   23 May 2003 20:36:06 -0000
@@ -106,9 +106,6 @@
      size_t ch;
      for (ch = 0; ch < COUNTOF(charset_table); ch += 1)
      {
-       /* convert uppercase to lower case */
-       if (isupper(ch))
-           casefold_table[ch] = tolower(ch);
         /* convert high-bit characters to '?' */
         if (ch & 0x80 && casefold_table[ch] == ch)
             casefold_table[ch] = '?';





More information about the Bogofilter mailing list