tackling sqlite byte-order problem
matthias.andree at gmx.de
Wed Feb 9 04:52:46 EST 2005
David Relson <relson at osagesoftware.com> writes:
>> I wonder if we should add a new token .ENDIAN32 (from datastore) that
>> stores the hex value 0x01020304 in natural byte order and use that to
>> figure if the database is byteswapped.
> .ENDIAN32 sounds fine to me. Clearly sqlite needs it. Is it of value
> for the other DB's we support?
> Alternatively, since we _know_ that .WORDLIST_VERSION is of form
> YYYYMMDD, we can split it into YYYY and MMDD and know that YYYY>MMDD is
> correct while MMDD>YYYY indicates is_swapped.
Is YYYYMMDD stored in BCD format? That's news to me, I thought it was in
digital, and in that case, the distinction between YYYY and MMDD doesn't
fall on a byte boundary.
More information about the Bogofilter-dev