Shane Dev
2017-06-04 20:05:48 UTC
Hello,
After logging in to Windows 10, I open a command prompt (cmd.exe) and
change the code page to Unicode (UTF-8)
then I test this with a UTF-8 file -
next I execute sqlite-tools-win32-x86-3190200\sqlite3.exe and check the
encoding
sqlite> pragma encoding;
UTF-8
then I try to print some characters to screen -
sqlite> select char(0x006e); --Unicode LATIN SMALL LETTER N
n
sqlite> select char(0x00e9); --Unicode LATIN SMALL LETTER E WITH ACUTE
sqlite> select char(0x006f); --Unicode LATIN SMALL LETTER O
o
sqlite> select char(0x20ac); --Unicode EURO SIGN
?
only the ascii characters are displayed correctly. Next I test outputting
the euro sign to a file -
sqlite> .once eurotest.txt
sqlite> select char(0x20ac); --unicode EURO SIGN
sqlite> .quit
.. and from the command prompt -
Why can't I display these Unicode characters from sqlite3 command line
utility?
P.S I have a similar in powershell but not in Ubuntu.
After logging in to Windows 10, I open a command prompt (cmd.exe) and
change the code page to Unicode (UTF-8)
chcp 65001
Active code page: 65001then I test this with a UTF-8 file -
type utf8test.txt
néo66€next I execute sqlite-tools-win32-x86-3190200\sqlite3.exe and check the
encoding
sqlite> pragma encoding;
UTF-8
then I try to print some characters to screen -
sqlite> select char(0x006e); --Unicode LATIN SMALL LETTER N
n
sqlite> select char(0x00e9); --Unicode LATIN SMALL LETTER E WITH ACUTE
sqlite> select char(0x006f); --Unicode LATIN SMALL LETTER O
o
sqlite> select char(0x20ac); --Unicode EURO SIGN
?
only the ascii characters are displayed correctly. Next I test outputting
the euro sign to a file -
sqlite> .once eurotest.txt
sqlite> select char(0x20ac); --unicode EURO SIGN
sqlite> .quit
.. and from the command prompt -
type eurotest.txt
€Why can't I display these Unicode characters from sqlite3 command line
utility?
P.S I have a similar in powershell but not in Ubuntu.