map "iso-" to "iso" bug
David Relson
relson at osagesoftware.com
Sat Jan 8 05:41:18 CET 2005
On Sat, 08 Jan 2005 04:51:14 +0300
Evgeny Kotsuba wrote:
> Hi,
>
> I am catching asian spam at night and looking at
> void set_charset(const char *charset)
> {
> .....
> if (c == '-' && /* map "iso-" to "iso" */
> memcmp(t, "iso", 3) == 0)
> continue;
>
>
> With charset="iso-2022-jp" it is mapped to "iso2022jp" that is not right
> The patch for it may look like following, but I am not sure at tooonight
Evgeny,
Give this a try. I think it's right, but don't have time to test it.
David
Index: charset.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/src/charset.c,v
retrieving revision 1.20
diff -u -r1.20 charset.c
--- charset.c 6 Jan 2005 00:11:04 -0000 1.20
+++ charset.c 8 Jan 2005 04:39:21 -0000
@@ -524,6 +524,7 @@
if (c == '_') /* map underscore to dash */
c = '-';
if (c == '-' && /* map "iso-" to "iso" */
+ d - t == 3 && /* ensure 3 chars avail */
memcmp(t, "iso", 3) == 0)
continue;
if (q && c == '"')
More information about the bogofilter-dev
mailing list