SQLite Forum

Timeline
Login

3 forum posts by user zby1234

2021-02-28
09:19 Reply: BUG Precompiled sqlite shell for windows can't open filenames with unicode chars (artifact: 112e023d65 user: zby1234)

Thank you for your reply. After some digging, I found the unicode argv[] support is just not compiled into offical binary. I downloaded the sqlite source repo and compiled sqlite shell myself, everything worked. (I'm using Visual Studio 2019 x64 native tools + self-compiled tclsh)

2021-02-27
10:25 Reply: BUG Precompiled sqlite shell for windows can't open filenames with unicode chars (artifact: a780a3cdfb user: zby1234)

Thank you very much!

But I'm using a old version of windows, which doesn't have well support of 'chcp 65001', and I'd like drag database to the icon of sqlite.exe. It would be appreciated if precompiled sqlite shell have native unicode support.

2021-02-26
17:08 Post: BUG Precompiled sqlite shell for windows can't open filenames with unicode chars (artifact: 99788ac1c2 user: zby1234)

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.

  1. 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?