SQLite Forum

Unicode Input/output in sqlite3.exe on Windows 10
Login
Hi all,

I cannot find a way to bring the shell (sqlite3.exe 3.37.1) to work with input/output of unicode text and look for assistance.

I'm on US Windows 10 64-bit (1903) with non-english locale.  I've faced some strange behavior of sqlite shell.

1. When I start sqlite3.exe in console and try to input unicode text the console hangs and I should terminate it (Ctrl + C).

2. When I try to open database from command-line `sqlite3 test.db` and then run query that expected to return unicode results I get garbage text instead.
For example I get:
```
sqlite> select * from unicode;
unicode is possible
Unicode ist moglich
Unicode ��������
sqlite>
```
instead of:
```
sqlite> select * from unicode;
unicode is possible
Unicode ist möglich
Unicode возможен
sqlite>
```

3. All GUI tools I've checked (DBeaver and SQlite Studio) work with the same database as expected, with correct input/output of unicode text. This also ensures that database itself is not corrupted. Python 3 and Golang also work correctly.

4. I've tried above with cmd.exe and with Windows Terminal. Both have `chcp 65001` by default. Oher popular console apps as `git` and `psql` work with unicode input/output without problems.

5. I've tried both precompiled sqlite3.exe binary from sql.org and also self-compiled with MinGW/gcc (option -municode). With the same results.

What did I do wrong? And what else should be done to make sqlite3.exe working with unicode? Thank you!