Please, @see https://github.com/yiisoft/yii2/issues/8432
Please help me,
Thanks advanced
you shouldn’t copy a link to another page and expect someone to go to it.
Most of the time someone will not click on it (i won’t) but from your title I can tell you that you have to encode and decode items you want to store in UTF-8 format in the db. This would be done using htmlspecialchars() function or in Yii2 you can use yii\helpers\Html::encode();
here is a model rule to endcode it
use yii\helpers\Html;
[["somefield"], "filter", "filter" => function ($value) {
return Html::encode($value);
}]
you will need to create a behavior or afterFind method etc to decode it for your views.
you can read about it here in the Yii2 Docs
I do not have problems with encode and decode UTF8 characters. I have problems with store UFT-8 in the database
is your db set up to handel utf-8?
And did you tell yii to tell it to use utf8
'components' => [
'db' => [
'charset' => 'utf8'
],
],
You may also have to set you .ini and/or htaccess to use / force utf8. Also, in you main layout tell it to use utf8.
Yes, sir
All config (db, html) for use uft8 but some words didn’t stored when query return null or “?”
Do you can store utf8 in db using other clients (workbench, phpmyadmin) ?
No i insert db using yii2 ActiveRecord
Please try test insert utf-8 character of entites 𢶽 into your test db with column collation utf8_unicode_ci you will known my problem