SQLite Forum

Unicode and CLI for Mac
Login
On my system, running Mac OS 11.3 Beta (Big Sur) and a downloaded precompiled version of SQLite3.

<code>SQLite version 3.32.3 2020-06-18 14:16:19
Enter ".help" for usage hints.
sqlite> SELECT x'c3a1', hex('á');
á|C3A1
sqlite> CREATE TABLE TestTable (testString TEXT);
sqlite> INSERT INTO TestTable VALUES (x'c3a1');
sqlite> INSERT INTO TestTable VALUES ('á');
sqlite> SELECT * FROM TestTable;
á
á
sqlite> SELECT * FROM TestTable WHERE testString IS 'á';
á
sqlite> SELECT typeof(testString),hex(testString),testString FROM TestTable;
blob|C3A1|á
text|C3A1|á
sqlite> .quit
simon@190 ~ % </code>

For some reason, the way I'd normally type 'á' on my Mac (hold down 'a', then choose '1') doesn't work in Terminal.  So in order to get the 'á' character into the Terminal window I pasted it in.