Noob question: wrong charset causes lots of troubles [2.0.10]

Started by Octavianus, August 03, 2015, 04:07:16 PM

Previous topic - Next topic

Octavianus

Hi,

I've upgraded my forum just today to 2.0.10 because my web hoster decided to move it to a new server. It runs smoothly again, but the character set is going mad (German interface). So far so bad.

My knowledge of PHP is increasing on a daily basis - starting yesterday. Therefore I hope you can help me clarifying some things.
First of all a quick briefing:
- charset is set to UTF-8 (I honestly don't know where to change that but it was the way before and it worked before, therefore I'd like to keep that)
- although set to UTF-8 my forum doesn't recognize any Umlauts (ä, ö, ü) or other specific letters like ß anymore and instead uses question marks on a black background
- if this isn't weird enough all posts before the update containing these special letters are invisible (they are there but it looks as if the user hasn't posted anything)
Website (so you can take a look for yourself): Meistertrainerforum[dot]de

Now I did some research, asked several people and websites and got a lot of responses. But now I haven't only question marks in my forum but also in my head ;)

- all the helpful people seem to talk in another language; sure thing, just run something in php and it works like charme... uhuh? And how do I run this sort of stuff? Where do I copy these php-lines? An example:
stackoverflow[dot]com/questions/1728746/how-to-properly-handle-international-character-in-php-mysql-apache
I've managed to set the collation of the db to UTF-8 (am I supposed to change all subtables of my db to UTF8_general_ci or does it even matter?)
But where's the "connection encoding"? Where do I start entering SQL codes (despite the fact that I barely haven't any clue of what I'm doing there)?

The forum allows me to convert the complete db and all it's data to UTF-8. Is there a way back in case of problems? Do I even have to convert every table to UTF-8? Is there no quicker and smoother way to bring back all Umlauts?

Is my language package corrupted? I've downloaded German-utf8, like it was before.

Sorry if my questions sound really nooby but I haven't done that kind of work before and I'm willing to learn but the guides and hints I've found so far were way too complex for me. If someone can direct me to a short introduction that would be very nice.

Thanks in advance!

Illori

Quote from: Octavianus on August 03, 2015, 04:07:16 PM
I've managed to set the collation of the db to UTF-8 (am I supposed to change all subtables of my db to UTF8_general_ci or does it even matter?)

yes it does matter.

take a look at http://wiki.simplemachines.org/smf/UTF-8_Readme

Octavianus

Thanks so far. Noob questions 1 and 2 follow:

1) So I just follow the instructions from your link? Because the process was aborted with an error message.
Edit: Suppose it won't work again, can I change the collation via MyPHPAdmin? And if so, are there any parts I might mess up?

2)
QuoteOnce all the UTF-8 language packs have been installed, convert the language settings of each user by running the following query
UPDATE smf_members
SET lngfile = CONCAT(lngfile, '-utf8')
WHERE lngfile != ''
Lets suppose I'll get this far... how? How do I run/start this query? Where do I have to put that code in?

Illori

lets start with... what was the error message you were given?

Octavianus

Shame! *Ding ding ding*

Apologies and mea culpa maxima. I should have read those guidelines more thoroughly. The conversion worked without any major issues and maybe it wasn't even necessary to initiate the backup from this morning.

My error (and hopefully other people won't make the same mistakes as I did): Make 10000% sure to have the same values in the dropdown menu and the line below. If they differ (and dumb as I am they differed) it causes a lot of error messages and messed up interfaces. :D

Anyway. Thanks for the quick support and maybe I'll let you know my progress with PHP and MySQL later in these forums.

Advertisement: