SQLite Forum

CLI on Windows: file name encoding problem
Login
Looking at the source of the shell (shell.c.in), I think I see the problem:

1. On Windows the entry point is a `wmain()` (line 10807), so arguments are passed as utf16 - the code page doesn't matter here.
2. In L10877 ff. all arguments are converted to utf8. BTW: is overwriting the wchar*'s in argv with char* legal C?
3. In L10925 the file path in utf8 is assigned to `data.zDbFilename`.
4. At least in L11080 that path is passed to `_access()`, which would expect the path in the current code page. I assume the same pattern exists in the actual file creation call. That would explain why it works with the "utf8 codepage" system setting.