Ich frickel momentan an der Umstellung meines Blogs und damit steht auch die Umstellung von ISO-8859-1 auf UTF-8 auf dem Plan.
Damit alles wunderbar funktioniert, hier die Vorgehensweise für eine MySQL 5-Datenbank:

  1. In PDT/ZS als Encoding des Projekts UTF-8 auswählen und Projekt neu builden lassen.
  2. Eventuell noch einmal mit Notepad++ sich die View-Scripte anschauen und manuell nach UTF-8 konvertieren (Format > Konvertiere zu UTF-8).
  3. Im head-Tag das obligatorische
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 

    einfügen.

  4. Einen Dump der aktuellen MySQL-Datenbank ziehen
  5. Diesen Dump mit Notepad++ nach UTF-8 konvertieren (s.o.)
  6. Im Dump CHARSET=latin1 durch CHARSET=utf8 ersetzen
  7. Neuen Dump einspielen und eventuell beim Connecten mit PHP zur Datenbank SET NAMES ‘utf8’ aufrufen.
  8. Glücklich sein.

I am asking you for a donation.

You liked the content or this article has helped and reduced the amount of time you have struggled with this issue? Please donate a few bucks so I can keep going with solving challenges.

Categories: DatabasesPHP

0 Comments

Leave a Reply