Da es immer wieder einmal Anfragen gibt, warum nach einem Board-Umzug auf einen anderen Server die Umlaute scheinbar kaputt sind, erklären wir hier zunächst einmal die Ursachen und geben auch Hilfestellung das Problem zu umgehen beziehungsweise die Umlaute zu reparieren.
Problem
Nach einem Umzug des Boards auf einen anderen Server, sind die Umlaute kaputt.
Beispiel: Anstelle eines ß wird ߸ im Text angezeigt.
Ursache des Problems
Das Datenbank-Backup wurde im falschen Zeichensatz (character_set) eingespielt.
Siehe dazu auch Die Umlautproblematik. Da wird dem geneigten Leser alles wichtige zum Thema erklärt.
Alternativer Link zu Die Umlautproblematik
An English translation of the Article "The Umlaut-Problem" can be found here: the umlaut problem how to successfully back up and restore mysql-databases with special characters using mysqldumper
Lösung des Problems
Grundsätzlich gibt es dazu folgendes zu sagen: Das Datenbank-Backup muss in dem Zeichensatz vorliegen und eingespielt werden, den die Datenbank erwartet.
Wie bekommt man aber nun heraus, welchen Zeichensatz die Datenbank erwartet?
Durch die Eingabe des folgenden SQL-Befehls in eurem Datenbank-Tool (z.b. phpmyadmin)
Code: Alles auswählen
SHOW VARIABLES LIKE 'character_set%';
In der Ausgabe schaut man dann, was bei character_set_client und bei character_set_connection steht.
Das ist dann der benötigte Zeichensatz.
Man sollte also sein Datenbank-Backup mit dem Mysqldumper anlegen und das Backup auch wieder mit dem Mysqldumper einspielen, um das Problem gar nicht erst aufkommen zu lassen (da der Mysqldumper das Backup im richtigen Zeichensatz anlegt und es auch im richtigen Zeichensatz einspielt).
Was mache ich aber nun, wenn ich keine Möglichkeit mehr habe das Datenbank-Backup (mit dem Mysqldumper) erneut anzulegen?
Wenn man nicht mehr an den alten Server heran kommt und somit keine Möglichkeit besteht das Backup erneut anzulegen, kann man die Umlaute manuell korrigieren.
Dazu sollte man dann folgende MYSQL-Befehle in seinem Datenbank-Tool ausführen:
Code: Alles auswählen
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'ß', 'ß') WHERE post_text LIKE '%ß%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, '´', "'") WHERE post_text LIKE '%´%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'ä', 'ä') WHERE post_text LIKE '%ä%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'ö', 'ö') WHERE post_text LIKE '%ö%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'ü', 'ü') WHERE post_text LIKE '%ü%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'Ä', 'Ä') WHERE post_text LIKE '%Ä%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'Ö', 'Ö') WHERE post_text LIKE '%Ö%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'Ãœ', 'Ü') WHERE post_text LIKE '%Ãœ%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'ß', 'ß') WHERE post_subject LIKE '%ß%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, '´', "'") WHERE post_subject LIKE '%´%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'ä', 'ä') WHERE post_subject LIKE '%ä%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'ö', 'ö') WHERE post_subject LIKE '%ö%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'ü', 'ü') WHERE post_subject LIKE '%ü%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'Ä', 'Ä') WHERE post_subject LIKE '%Ä%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'Ö', 'Ö') WHERE post_subject LIKE '%Ö%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'Ãœ', 'Ü') WHERE post_subject LIKE '%Ãœ%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'ß', 'ß') WHERE user_sig LIKE '%ß%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, '´', "'") WHERE user_sig LIKE '%´%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'ä', 'ä') WHERE user_sig LIKE '%ä%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'ö', 'ö') WHERE user_sig LIKE '%ö%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'ü', 'ü') WHERE user_sig LIKE '%ü%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'Ä', 'Ä') WHERE user_sig LIKE '%Ä%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'Ö', 'Ö') WHERE user_sig LIKE '%Ö%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'Ãœ', 'Ü') WHERE user_sig LIKE '%Ãœ%';
UPDATE phpbb_users SET user_from = REPLACE(user_from, 'ß', 'ß') WHERE user_from LIKE '%ß%';
UPDATE phpbb_users SET user_from = REPLACE(user_from, '´', "'") WHERE user_from LIKE '%´%';
UPDATE phpbb_users SET user_from = REPLACE(user_from, 'ä', 'ä') WHERE user_from LIKE '%ä%';
UPDATE phpbb_users SET user_from = REPLACE(user_from, 'ö', 'ö') WHERE user_from LIKE '%ö%';
UPDATE phpbb_users SET user_from = REPLACE(user_from, 'ü', 'ü') WHERE user_from LIKE '%ü%';
UPDATE phpbb_users SET user_from = REPLACE(user_from, 'Ä', 'Ä') WHERE user_from LIKE '%Ä%';
UPDATE phpbb_users SET user_from = REPLACE(user_from, 'Ö', 'Ö') WHERE user_from LIKE '%Ö%';
UPDATE phpbb_users SET user_from = REPLACE(user_from, 'Ãœ', 'Ü') WHERE user_from LIKE '%Ãœ%';
UPDATE phpbb_users SET user_occ = REPLACE(user_occ, 'ß', 'ß') WHERE user_occ LIKE '%ß%';
UPDATE phpbb_users SET user_occ = REPLACE(user_occ, '´', "'") WHERE user_occ LIKE '%´%';
UPDATE phpbb_users SET user_occ = REPLACE(user_occ, 'ä', 'ä') WHERE user_occ LIKE '%ä%';
UPDATE phpbb_users SET user_occ = REPLACE(user_occ, 'ö', 'ö') WHERE user_occ LIKE '%ö%';
UPDATE phpbb_users SET user_occ = REPLACE(user_occ, 'ü', 'ü') WHERE user_occ LIKE '%ü%';
UPDATE phpbb_users SET user_occ = REPLACE(user_occ, 'Ä', 'Ä') WHERE user_occ LIKE '%Ä%';
UPDATE phpbb_users SET user_occ = REPLACE(user_occ, 'Ö', 'Ö') WHERE user_occ LIKE '%Ö%';
UPDATE phpbb_users SET user_occ = REPLACE(user_occ, 'Ãœ', 'Ü') WHERE user_occ LIKE '%Ãœ%';
UPDATE phpbb_users SET user_interests = REPLACE(user_interests, 'ß', 'ß') WHERE user_interests LIKE '%ß%';
UPDATE phpbb_users SET user_interests = REPLACE(user_interests, '´', "'") WHERE user_interests LIKE '%´%';
UPDATE phpbb_users SET user_interests = REPLACE(user_interests, 'ä', 'ä') WHERE user_interests LIKE '%ä%';
UPDATE phpbb_users SET user_interests = REPLACE(user_interests, 'ö', 'ö') WHERE user_interests LIKE '%ö%';
UPDATE phpbb_users SET user_interests = REPLACE(user_interests, 'ü', 'ü') WHERE user_interests LIKE '%ü%';
UPDATE phpbb_users SET user_interests = REPLACE(user_interests, 'Ä', 'Ä') WHERE user_interests LIKE '%Ä%';
UPDATE phpbb_users SET user_interests = REPLACE(user_interests, 'Ö', 'Ö') WHERE user_interests LIKE '%Ö%';
UPDATE phpbb_users SET user_interests = REPLACE(user_interests, 'Ãœ', 'Ü') WHERE user_interests LIKE '%Ãœ%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'ß', 'ß') WHERE topic_title LIKE '%ß%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, '´', "'") WHERE topic_title LIKE '%´%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'ä', 'ä') WHERE topic_title LIKE '%ä%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'ö', 'ö') WHERE topic_title LIKE '%ö%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'ü', 'ü') WHERE topic_title LIKE '%ü%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'Ä', 'Ä') WHERE topic_title LIKE '%Ä%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'Ö', 'Ö') WHERE topic_title LIKE '%Ö%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'Ãœ', 'Ü') WHERE topic_title LIKE '%Ãœ%';
Dieses Programm versucht die falschen Umlaute direkt in der Datenbank zu finden und zu korrigieren.
Grüße: Mahony