PHP mb_convert_encoding, issue with double decoding

948 Views Asked by At

I have some problems with mb_convert_encoding. In the database I have table:

  • topics (latin1_swedish_ci)

Website is in UTF-8. And db connection to MySQL is in UTF-8 too. I can't change connection settings, but I can change db table.

I was thinking that I can double decode it and get UTF-8. For now it's looks like so:

string 'КвеÑты.' (length=27)

And I've tried next solution:

mb_convert_encoding($str, 'Windows-1251', 'UTF-8');

Out:

string '?????�???�?�.' (length=13)

0

There are 0 best solutions below