0

I am reading in data to MySQL using Sequel Pro but it won't reading in special characters like Ö, ü, ç, ñ, ß. I tried Western ISO Latin 1, that doesn't work. I also tried Western DOS Latin 1, that actually converts these characters to something else. Is there a way to preserve the original characters and don't change them when importing the data?

Barranka
  • 20,547
  • 13
  • 65
  • 83
PMa
  • 1,751
  • 7
  • 22
  • 28

1 Answers1

0

try using:

mysqli_set_charset($con,"utf8"); // assuming mysqli and connection name of $conn

There are variations for the mysql (depreciated) drivers and PDO as well.

mysql_set_charset("utf8");
$dbh -> exec("set names utf8"); // assuming a connection string of $dbh
Len_D
  • 1,422
  • 1
  • 12
  • 21
  • I typed `mysqli_set_charset($con,"utf8")` into the console, but it says there is a syntax error. Is this something I need to type in to the terminal window? – PMa Nov 06 '14 at 23:43
  • I also recreated the database using `utf-8`, then load the data, and getting error `utf-8 conversion error`. :( How can I load these data into the database... – PMa Nov 07 '14 at 00:34