[PATCH 2/8] Files: add wrappers for open(), fopen(), sqlite3_open()
Jef Driesen
jefdriesen at telenet.be
Thu Dec 19 00:19:04 UTC 2013
On 2013-12-18 23:47, Lubomir I. Ivanov wrote:
> diff --git a/windows.c b/windows.c
> index ff6e2e0..27be1df 100644
> --- a/windows.c
> +++ b/windows.c
>
> +int subsurface_sqlite3_open(const char *path, sqlite3 **handle)
> +{
> + int ret = SQLITE_ERROR;
> + wchar_t *wpath = utf8_to_utf16(path);
> + if (wpath) {
> + /* try to use _open16 here */
> + ret = sqlite3_open16((const void *)wpath, handle);
> + free((void *)wpath);
> + return ret;
> + }
> + return ret;
> +}
I don't think this is necessary. The sqlite3_open function already
expects a utf8 string:
http://www.sqlite.org/c3ref/open.html
Jef
More information about the subsurface
mailing list