Apostrophes, acute accent marks, umlauts being replaced with question marks

Started by natcip, October 04, 2017, 02:07:36 AM

Previous topic - Next topic

natcip

Hey guys!
So my host just moved the whole board to a new server and ever since, characters like ', é, ä, ö, ü are being replaced with question marks.

The weird thing is, it doesn't happen to all users. For example, this post by user1 had the issue, while this post by user2 had no problem with the apostrophe (both posts were from the same topic).

Anyone got an idea what could be the issue?

Sir Osis of Liver

That's interesting.  Those two posts were made less than a half hour apart.  Is your database utf-8?
Even if the whole world has forgotten,
The song remembers when.

                              - H. Prestwood

natcip

Quote from: Sir Osis of Liver on October 04, 2017, 12:40:53 PM
That's interesting.  Those two posts were made less than a half hour apart.  Is your database utf-8?
I think it is. Where can I check it? I have phpmyadmin, but couldn't really find it in the settings.

Steve

My pet rock is not feeling well. I think it's stoned.

Sir Osis of Liver

You should see this in Settings.php -



     $db_character_set = 'utf8';



In your database, Collation should be utf8_general_ci.

Even if the whole world has forgotten,
The song remembers when.

                              - H. Prestwood

natcip

Quote from: Sir Osis of Liver on October 06, 2017, 12:47:14 PM
You should see this in Settings.php -



     $db_character_set = 'utf8';



In your database, Collation should be utf8_general_ci.
For some reason, my Settings.php doesn't have that line at all. Should I just add it to the Database Info in Settings.php?

Also, I noticed that all the tables of my database were set to "latin1_swedish_ci". Weird ???
I'm gonna change them now to utf8_general_ci and let you know if it works.

Sir Osis of Liver

Quote from: Steve on October 06, 2017, 10:55:17 AM
https://wiki.simplemachines.org/smf/UTF-8_Readme

Looks like your db was never converted to utf-8.  As per Steve's link, use Admin -> Forum Maintenance -> Database to do the conversion, don't try editing db manually.
Even if the whole world has forgotten,
The song remembers when.

                              - H. Prestwood

natcip

I solved it. The default language for some reason was English ISO-8859-1 (I don't know how that happened after moving the server). I installed the newest language pack in UTF-8. Now it works. Thanks everyone for the efforts!

Advertisement: