mbbsemu / MBBSEmu

The MajorBBS Emulation Project is an Open Source, Cross-Platform emulator for easily running The MajorBBS & Worldgroup Modules
https://www.mbbsemu.com
MIT License
132 stars 14 forks source link

Support Btrieve ACS #287

Closed paladine closed 3 years ago

paladine commented 3 years ago

Btrieve databases support ACS (Alternate Collating Sequences), which is a custom string map that can be used for case-insensitive keys. String fields support this flag. Any string inserted as a key is mapped against the ACS table byte[256] like so

for(char *s = requested_key_value; *s; ++s)
  *(actual_key_value++) = acs_map[*s];

The ACS table is stored in one of the Btrieve pages.

The ACS map should be stored in metadata_t since there is only one per database.

paladine commented 3 years ago

I should also update the Btrieve wiki after this change