Answer the question
In order to leave comments, you need to log in
Why is Cyrillic not inserted into mysql columns?
I do INSERT in the table, all fields are adequately interposed, except for lines in Cyrillic, in these places empty columns. Latin is ok.
Terminal in utf-8
file /etc/mysql/my.cnf:
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
init-connect="SET NAMES utf8"
skip-character-set-client-handshake
[mysql]
default-character-set = utf8
[client]
default-character-set = utf8
[mysqldump]
default-character-set = utf8
mysql> SHOW VARIABLES LIKE 'char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.02 sec)
INSERT INTO `Tovar` (`name`,`price`) VALUES
('Гвозди','34'),
('Молоток','150'),
('Лопата','100');
mysql> SELECT * FROM Tovar;
+----+------+-------+
| id | name | price |
+----+------+-------+
| 1 | | 34 |
| 2 | | 150 |
| 3 | | 100 |
+----+------+-------+
3 rows in set (0.00 sec)
mysql> INSERT INTO `Tovar` (`name`,`price`) VALUES
-> ('','34'),
-> ('','150'),
-> ('','100'),
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question