mercredi 22 janvier 2020

Wrong collation creates invalid markers laravel

So I'm developing a laravel app in my localhost which is a windows laptop but my app server is in a linux server. When I'm developing and saving in a textarea some random text with special chars like "Ç ~ º" everything is well saved in db and showed in browser. The problem is in the server (linux), it creates specials chars like "pátio nº 64/2 " and shows bad in the browser.

I've tried to change collation in the config/database.php file to the same as the db (we use portuguese collation) 'collation' => 'Latin1_General_CI_AS' and charset =>'utf8' but nothing changed.

Any ideas? If I change the charset to latin1 isntead of utf8 the server shows a error

PDOException in Connector.php line 55
SQLSTATE [] (null) (severity o)

I've also tried ot use html decode entities before save in the db but didn't work. I really need some help in this issue...



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire