PHP Classes

Correct Umlauts

Recommend this page to a friend!

      MySQL Dump - database backup  >  All threads  >  Correct Umlauts  >  (Un) Subscribe thread alerts  
Subject:Correct Umlauts
Summary:To get correct umlauts when importing the file with phpmyadmin
Date:2011-11-19 10:26:56

  1. Correct Umlauts   Reply   Report abuse  
Philipp - 2011-11-19 10:26:56
PhpMyAdmin defaults to UTF8 when importing an SQL / SQL.GZ File.
Most Mysql Servers default charset is not UTF8, but latin1 or something else.

if you query this, after connecting to the database (and before instantiating MySQLDump), you will always get correct umlauts.

mysql_query("SET NAMES 'utf8'", $db);
mysql_query("SET CHARACTER SET 'utf8'", $db);