[PATCH] Files: fix a path encoding issue on Windows

Lubomir I. Ivanov neolit123 at gmail.com
Tue Dec 17 09:26:01 UTC 2013

On 17 December 2013 18:40, Thiago Macieira <thiago at macieira.org> wrote:
> On terça-feira, 17 de dezembro de 2013 06:48:51, Dirk Hohndel wrote:
>> Thiago, can I get an ACK from you for this patch, please?
> ACK, but incomplete.
> There are other places where we encode filenames to 8-bit. We should:
>  - ensure that all file names are encoded with QFile::encodeName and decoded
>    with QFile::decodeName
>  - we initialise QFile on Windows (setEncodingFunction, setDecodingFunction)
>  - fix other places where we open files, including zip_open[1]
> I can do the first two. I see other open calls in save-xml.c and uemis-
> downloader.c, plus the zip_open calls and one sqlite3_open.
> [1] We need to fix libzip upstream with either an encoding mechanism for
> windows or a zip_wopen.

in that case, i would discard my patch for now.
i can fix step 3, with wrappers in windows.c, linux.c, etc...
and basically provide the following wrappers (OTTOMH):

can't seem to find zip_wopen in their API, which means we need to use
_wopen with zip_fdopen

if someone has better ideas please, or corrections please share them.
i probably start making these changes tomorrow morning GMT.


More information about the subsurface mailing list