>From rfc2822:
2.2. Header Fields
Header fields are lines composed of a field name, followed by a colon
(":"), followed by a field body, and terminated by CRLF. A field
name MUST be composed of printable US-ASCII characters (i.e.,
characters that have values between 33 and 126, inclusive), except
colon. A field body may be composed of any US-ASCII characters,
except for CR and LF.
...
Aaron Stone wrote:
> I disagree; we should let the database do the lowercasing so that it
> matches exactly with how the database does the lowercase index.
>
> Uh, unless it's required that headers are US-ASCII < 128? If so, then
> it's the old "six of one, half dozen of the other..."
>
> Aaron
>
> On Mon, 2005-12-12 at 21:45 +0100, Paul J Stevens wrote:
>
>>Kevin Brown wrote:
>>
>>>Also, since "lower" is also ANSI-standard and supported by all three
>>>databases, we should probably use that instead of "upper", since the
>>>data will be more readable should we decide to store the data in
>>>case-converted form some time in the future. So, s/upper/lower/g in
>>>the diff (and in the functional index, of course).
>>
>>Let's do this:
>>diff --git a/dm_imaputil.c b/dm_imaputil.c
>>--- a/dm_imaputil.c
>>+++ b/dm_imaputil.c
>>@@ -736,12 +736,13 @@ static GTree * _fetch_headers(const GLis
>>
>> r = g_list_join((GList *)ids,",");
>> h = g_list_join((GList *)headers,"','");
>>+ h = g_string_ascii_down(h);
>>
>> g_string_printf(q,"SELECT physmessage_id,headername,headervalue "
>> "FROM %sheadervalue v "
>> "JOIN %sheadername n ON v.headername_id=n.id "
>> "WHERE physmessage_id IN (%s) "
>>- "AND headername %s IN ('%s')",
>>+ "AND lower(headername) %s IN ('%s')",
>> DBPFX, DBPFX, r->str, not?"NOT":"", h->str);
>>
>> g_string_free(r,TRUE);
>>
>>
>
>
> _______________________________________________
> Dbmail-dev mailing list
> [email protected]
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>
--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl