N
N
Nikolai Konyukhov2015-10-21 13:49:27
*nix-like systems
Nikolai Konyukhov, 2015-10-21 13:49:27

Linux, how to get rid of encoding problems?

Good afternoon!
Win7 is installed on the working machine, the CI server runs the assembly according to tests in a virtual machine with CentOS 6.7 installed
Php the project uses codeception functional tests. There are no problems on the local machine, when transferring the project to a virtual machine, I get the following sql error

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xD0\x9F\xD1\x80\xD0\xBE...' for column .......T acc_set_balance('*', '*', NOW(), '*', '*', '*', 'Продажа сертификата через web-сервис'

What has already been done:
All project files in utf8 encoding without bom (the message is written in the file),
In the database connection settings (yii2) is 'charset' => 'utf8',
In my.cnf
[mysql]
default-character-set=utf8

[client]
default-character-set=utf8

[mysqld]
collation-server = utf8_general_ci
init-connect='SET NAMES utf8'
character-set-server=utf8

Base, tables, columns in utf* utf8_general_ci

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nadz Goldman, 2015-10-21
@heahoh

So you specifically process all the lines with iconv or convert
Type

ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

I believe you did, but still - process every base, table and row in the tables.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question