SQLite Forum

Unicode and CLI for Mac
Login
I have a database of artists and CDs and access it in a web environment using Perl. Finally got it converted to accept Unicode characters. However I have to use Perl to enter and retrieve correctly rendered data.

Using the CLI if I try to enter a Unicode character, the sqlite shell seems to hang, and returns to a bash shell after hitting Enter.

When retrieving data, it does not render correctly, yet my Perl script renders it correctly.

So my question is: am I missing something in the sqlite CLI? As far as I know I'm entering characters correctly using Alt [hex code] and  the Character Viewer is set to  Unicode Hex Input.

<code>
sqlite> select name from artists where artistid=1373;
Ali Farka Touré & Toumani Diabaté
</code>

The database schema:
<code>
CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE IF NOT EXISTS "artists" (
	`id`	integer NOT NULL,
	`artistid`	integer,
	`name`	text,
	PRIMARY KEY(`id` AUTOINCREMENT)
);
CREATE TABLE IF NOT EXISTS "cds" (
	`id`	integer,
	`artistid`	integer,
	`cdid`	INTEGER,
	`title`	text,
	`runtime`	text,
	`notes`	text, 'genre' text,
	PRIMARY KEY(`id` AUTOINCREMENT)
);
</code>
I tried recompiling sqlite3 using '-DSQLITE_ENABLE_ICU' after downloading a library from site.icu-project.org. That failed because some .h source files were missing. This after reading the <a href="https://https://sqlite.org/quirks.html">Quirks, Caveats, and Gotchas In SQLite</a> page.

Perhaps I downloaded an incorrect library? Can anyone shed some light on this please. Many thanks.