M
M
Maxim Osadchy2017-09-15 22:51:38
Yii
Maxim Osadchy, 2017-09-15 22:51:38

How to properly transliterate in yii2?

I save images in the database, they have names in Cyrillic, save like this - PђRєR ° фист всем святым жена Рј
Are there any good practices or ready-made methods in yii for this case, so as not to write crutches ?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Decadal, 2017-09-15
@Decadal

This is a consequence of incorrect work with encodings. Make sure that your base is utf8 or utf8mb4 encoded, and that the same is specified in the configs. If you are unable to change the encoding in the database, make sure that in the application configs it at least matches the one in the database, and that the same encoding is specified in the meta tags.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question