Ok, here my way step-by-step to do it on my
test-board1) close board
2) do a backup and store it in a save place
3) do a testposting with you admin account with all chars you need to convert. Example:
***!marker!***
ae = ä
oe = ö
ue = ü
sz = ß
Ae = Ä
Oe = Ö
Ue = Ü
euro = €
grad = °
hoch 2 = ²
hoch 3 = ³
4) do another backup (I use mysqldumper) and store it local an your computer, logout the forum
5) unpack the backup if you got .gz file, you will get a big text file with your database content
6) use notepad++ or an other editor which can edit utf-8 files for search and replace for each char that need to be convert. Please check casesensitiv for the search! Repeat for each char over the complete textfile. To get a list of chars who need to be convert search for ***!marker!*** and you find your testposting. In this line you find the wrong chars. Copy the line to a second editor window, delete not needed text and you have a source for copy&paste for your search in the db dump. It could look like this
ae = ä
oe = ö
ue = ü
sz = ß
Ae = Ä
Oe = Ö
Ue = Ü
euro = €
apo = \'
grad = °
hoch 2 = ²
hoch 3 = ³
7) save it
8) modify the mysqli.inc.php and add the line
mysqli_set_charset( $this->dbh, "utf8" );
under the line
$this->dbh = mysqli_connect($config['DATABASE_SERVER'], $config['DATABASE_USER'], $config['DATABASE_PASSWORD'], $config['DATABASE_NAME']) or die("Problem occured in connection"); and
$this->dbh = mysqli_pconnect("p:" . $config['DATABASE_SERVER'], $config['DATABASE_USER'], $config['DATABASE_PASSWORD'], $config['DATABASE_NAME']) or die("Problem occured in connection"); (line 29 and line 31)
9) import the database file in your forum. If the file is > 2MB please use a tool such as mysqldump. You find a version who works with pphp7.2 here:
https://github.com/DSB/MySQLDumper10) login the forum, check it and reopen it for public
Note: please take care of your language file generic.php! please check it for the language encoding on top of the file. Change it to utf-8 if you use iso in the past.
This takes 5-10 minutes in all if you have mysqldumper installed and know how to handle the files and editor. Its easy.
The only thing that makes problems: searching for a ' is not easy. It is stored as \' but this combination is used in several places and it is not allowed to be changed.
*NOTE* without any warranty
