I am trying hard to find the solution of this problem but cant find it…
I am testing an infinite scroll script (found here: https://github.com/tournasdim/PHP-infinite-scrolling ) , the infinite scroll is working fine, but after I implement that, the caracters got disconfigured just when I include the php with the results of my mysql seaarch.
My database is 100% in charset utf-8 and all the pages that Im using in this test is in uft-8 aswell. So I gess that its something I need to put on the .js file, and I am newbie on all of this dont know what to do 😀
the test page you can see here: http://hogardelocio.com/teste2.php
Note that on the top menu I wrote “ñ¿¡á” just to test and it shows no error, but down on the pictures and text that cames from the database and ajax itshow the error.
The problem is from your database connection.
The connection must be UTF-8.
In PDO add
charset=UTF-8in DSN, eg:mysql:host=localhost;dbname=test;charset=UTF-8In old MySQL and MySQLi: before any queries run
"SET NAMES 'UTF8'"