[Date Prev][Date Next]
Re: Fwd: LMDB and text encoding
On 02. feb. 2015 14:24, Howard Chu wrote:
Hallvard Breien Furuseth wrote:
I suggest we wait to deal with DB names until we also have a way to
deal with filenames. And this time test that it works is practice:-)
Hopefully users and programmers will only need one method of handling
non-ASCII LMDB names on Windows, not two.
I'd be nice if 'mdb_stat filename -s dbname' would Just Work, as would
reading DB names and filenames from an config file. Yet OS-aware and
OS-specific config files can look rather different. Maybe LMDB must
handle DB names more flexibly than filenames, or maybe we'll end up
recommending that "portable" DB names must be UTF-8. And add a "flag
convert UTF8<->WCHAR if this is Windows".
DB names are purely internal to LMDB, so they bear no relation to OS
filenames and none of this discussion matters to them.
They're exposed to the programmer and the program's users. Either may
want them on command-line arguments, in config files, etc. It will be
inconvenient if LMDB requires different string handling for non-ASCII
filenames and non-ASCII DB names in such cases. The programmer may
choose to use different string handling but let's try to avoid forcing
him to do so.