T
T
tayanov2015-01-27 09:21:15
PHP
tayanov, 2015-01-27 09:21:15

How to debug encoding problem?

I load csv via phpmyadmin (via csv load data)
I get cracks. Everywhere. From an ssh request.
From a web request and from data in phpmyadmin.
By coding, I read many examples of solutions, but all cases are special.
Is there a way to identify problems?
For example, here are kryakozyabry.
Prim - in Russian this word is "prim".
Although I downloaded in a similar way earlier and there were no problems.
What do I have.
CSV in notepad++ shows utf8
mysql -u root -p -e "show variables like '%character%'" returns
+------------------------- --+---------------------+
| 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/ |
+--------------------+--------------------- ------+
Mysql_query("SET NAMES utf8");
Zayuzal even !includedir /etc/mysql/conf.d/
with lines
[mysqld]
default-character-set=utf8
[client]
default-character-set=utf8
Sometimes even empty strings are loaded instead of Cyrillic, and numbers are loaded. Where to start tell me.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir, 2015-01-27
@rostel

csv itself in what encoding?

D
Dmitry Entelis, 2015-01-27
@DmitriyEntelis

look at the encoding of specific fields in the table just in case.
upd if csv and base are not secret - upload somewhere, it's hard to say without looking

T
tayanov, 2015-01-27
@tayanov

notepad++ says csv is in utf8.
All fields in the table are set as utf8_general_ci

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question