tackling sqlite byte-order problem

Matthias Andree matthias.andree at gmx.de
Thu Feb 10 02:02:34 CET 2005


David Relson <relson at osagesoftware.com> writes:

> My bad.  It's binary, not BCD.  Splitting would be "divide by 10000" and
> check for reasonable results.

Yup. I'd think we'd better add .ENDIAN32 at creation time to remove
hunting for dates. The YYYY must be >= 2002 (first bogofilter release)
and the MMDD <= 1231. We can gather dates almost everywhere, token
timestamp, .WORDLIST_VERSION, we can sanity check .ROBX, but whenever
the database is open for update, we'd better place an .ENDIAN32 tag for
efficiency.

> As a sanity check I wrote the little
> program I've attached.  It does an endian swap then prints the dates and
> their yyyy and mmdd components.  Perhaps it's useful; perhaps it's not.

-- 
Matthias Andree



More information about the bogofilter-dev mailing list