I have a table news. Inside I have a column text with utf8_unicode_ci encoding set. Some native old php application is doing database insert and my yii2 application is responsible for reading.
This is a sentence that needs to be displayed in my application ( among others ):
Igračke, Školski asortiman, Papirna galanterija, Dečje knjige, Dečja odeća
In database it is saved like this:
IgraÄke, Å kolski asortiman, Papirna galanterija, DeÄje knjige, DeÄja odeÄ‡a
When I do mb_detect_encoding on the returned output from the database it is saying that this is UTF-8.
If I do utf8_decode on the output I get almost good result:
Igračke, Školski asortiman, Papirna galanterija, Dečje knjige, Dečja ode�?a
Problems are these two question marks in the last word.
I have set these to try to get proper output but nothing:
and in index.php file:
header('Content-Type: text/html; charset=utf-8');
Why I am not getting good output ? In old not yii application everything is displayed correctly…