[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#8069) MDb library patch: Use explicit Windows API functions for char* strings

pmedvedev@gmail.com wrote:
> Full_Name: Pavel Medvedev
> Version:
> OS: Windows 7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (
> Most Windows API functions such as CreateFile(), CreateMutex(),
> OpenMutex() that accept string arguments,  are defined with suffix W or A
> for appropriate wchar_t* or char* strings, depending of _UNICODE
> preprocessor define. Calling explicit functions with A suffix would eliminate
> compile errors when _UNICODE is defined.

Thanks, committed to mdb.master.
> As a further enhancement, I think path argument encoding should be documented
> (probably UTF-8?) for such functions as mdb_env_open(), mdb_env_copy(),
> mdb_env_copy2(), and mdb_env_get_path(). This prevent possible problems with
> non-latin characters in path names on Windows.
> In this case, LMDB implementation on Windows should perform path
> conversion to UTF-16 and explicit call to CreateFileW() in mdb_env_open()
> and mdb_env_copy2() functions.

We've been discussing this change on and off for a while. That sounds like the 
correct approach; patches welcome.

   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/