News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

UTF-8 Error

Started by crows, August 05, 2019, 07:29:57 PM

Previous topic - Next topic

crows

Hello! My website went through some errors with AE-type symbols, and my admin and I are attempting to fix it. We're dealing with errors that it looks to be related to UTF-8, and so we tried to update our site to the UTF-8 language. Our cpanel tells us, however, that we're already on UTF-8, while our site says that we're not. Any attempts to update to UTF-8 on our site ends in this error:

QuoteDuplicate entry 'maintenance-21966' for key 'PRIMARY'
File: /home/bearbone/public_html/Sources/ManageMaintenance.php
Line: 666

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.13, while your database is at version 2.0.12. The above error might possibly go away if you execute the latest version of upgrade.php.

We're trying to avoid updating, as we have an important sub-account mod that we're concerned won't transfer. However, we want to fix this AE symbol error to avoid this event from happening again (and potentially fixing the posts affected). Does anyone have any advice?

Apologies for anything confusing or vague, I am not a coder by any means and a lot of this terminology is very new to me. '^^

Sir Osis of Liver

The database upgrade message can be ignored.  Are your database and tables at utf-8 when you view them in phpmyadmin?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

crows

Yes! The server says that our tables are "utf8_general_ci" and our server connection collation is "utf8mb4_unicode_ci"

Sir Osis of Liver

Look in Settings.php, does it contain this line?



$db_character_set = 'utf8';


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

crows

I am so sorry, I'm having a hard time finding Settings.php and google/searches isn't helping much - where is it located?

If it's not in the line of code, should I add it in?

Kindred

Settings.php is in the root of your forum
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Quote from: crows on August 06, 2019, 02:09:21 AM
If it's not in the line of code, should I add it in?

Yes.  When you do the utf-8 conversion in admin, it adds that line.  If your database is utf-8 and it's not in Settings.php, the forum won't recognize utf-8.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

crows

Thank you all! We put it in - is there a way to resolve the AE symbols, or will we manually need to fix those themselves?

shawnb61

Are the issues only in message bodies, or are they elsewhere, e.g., topics?

I've been working on a script to fix these.  If interested, let me know. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

crows

They're in our topics and messages! I would definitely be interested in anything to fix it without having to go in manually.

shawnb61

Here is the utility I have been using. 

Please read the notes in there carefully.  BACKUP your system first! 

https://github.com/sbulen/sjrbTools/blob/master/smf_fix_dbl_enc_deep.php

This only does message bodies.  If this works for you, I can look at one for topics as well.  Let me know how it goes. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: