Reputation: 53
I would like to use "Ä, Ö and Ü" in my sqlite database but when I use the snippet of code below, I am unable to retrieve the accented characters.
I am accessing the database using android or via sqlite3
CREATE TABLE haltestellen (
id integer primary key autoincrement,
name varchar(64)
);
insert into haltestellen(name) values("Bärenhof");
Upvotes: 1
Views: 5371
Reputation: 8657
CREATE TABLE haltestellen (
id integer primary key autoincrement,
name varchar(64) charset utf8
);
insert into haltestellen(name) values("Bärenhof");
If this doesn't work, you should show the code you use and make sure that everything is using utf8
Upvotes: 1
Reputation: 2081
Sqlite only supports UTF-8 and UTF-16 (see this question) there should not be a problem with your charset.
I guess that the terminal or tool you use to make the queries just does not support UTF-8 (or doesn't have it enabled). Just use a terminal or tool that supports UTF-8 and you should be fine.
As you do not give any more information I assume that you use the windows terminal cmd.exe. You could try what was suggested in this question:
chcp 65001
Still, for a better suited answer you will have to provide more information about your setup, like what are you actually trying where.
Upvotes: 3