SQLite Forum

[BUG] Precompiled sqlite shell for windows can't open filenames with unicode chars
Login
Hello,

  Thank you for developing SQLite! However, I found the precompiled sqlite shell for windows which is downloaded from offical site (sqlite-tools-win32-x86-3340100.zip), can't open db files with unicode characters in its file name.

Steps to reproduce:

1. Create a test database 'test.db'
2. Rename 'test.db' to '你好世界.db' (or try some strange names such as emojis)
3. Try to open '你好世界.db' with sqlite shell and do some query.

What happened:

1. If the unicode char in filename can be represented in current code page:

  The shell will silently create a new db file named '�������.db' and operate on that new file.

2. If the unicode char in filename can't be represented in current code page:

  The shell will try to create a new db file named '????.db' and say filename is illegal.

My thoughts:

It's seems like unicode file name support in sqlite shell is broken. Although I found shell.c uses wmain() and is unicode aware, it seems the precompiled binary continue to use the ANSI versions of API. May be unicode support isn't compiled in?