MySQL - executing text file with unicode causes "question marks" -
the table:
create table test (test varchar(10));
test.sql
:
insert test values ('тест');
in bash:
$ mysql --version mysql ver 14.14 distrib 5.5.31, debian-linux-gnu (x86_64) using readline 6.2 $ file -bi test.sql text/plain; charset=utf-8 $ mysql --database=... --user=... -p --default-character-set=utf8 < test.sql
results to
mysql> select * test; +------+ | test | +------+ | ???? | +------+
how execute test.sql
properly?
trying using utf8 default charset on table you're not using sort of latin encoding default.
create table test (test varchar(10)) default charset=utf8;
Comments
Post a Comment