Through PHP im generating some text on the site. My site language is in polish and special characters like: ł,ó or ś are being replace by question marks. Is there a way i can fix this ? Evrything works when i test it on my PCs loclahost. My databses have correct collations.
Hi and welcome to the forum! Adding something like this to your MySQL connection’s set up PHP file:
$mysqli->set_charset("utf8mb4");
after setting up the connection or, if you’re using PDO, inserting ;charset=utf8mb4 at the end of the connection string before the username string should do the trick. If not, also make sure the PHP file is saved as UTF-8 locally, then upload it again.
10 Likes
thanks man, you are a lifesaver
4 Likes
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.