Collation question/issue

Jay50's profile image Jay50 posted 7 years ago in General Permalink

Hi,

I have a MySQL table that is utf8_general_ci (MyISAM).

One of the rows of data contains a Spanish word (Cariño).

When I export the data to an SQL file, then import to my localhost this word has been converted to Cariño.

What could be causing this, and how can I resolve?

Many thanks

kalvaro's profile image kalvaro posted 7 years ago Permalink

The export looks fine. Either your target database isn't using UTF-8, or you've never declared your data as such.

Jay50's profile image Jay50 posted 7 years ago Permalink

Thanks for the reply Kalvaro.

Just looked at the exported SQL file in a text editor and it's fine.

Can you explain where I should be looking? I'm guessing because the export is ok the data is declared correctly?

When I view the SQL, at the point it creates the data-structure for this table, it states:

) ENGINE=MyISAM AUTO_INCREMENT=559 DEFAULT CHARSET=utf8;```
kalvaro's profile image kalvaro posted 7 years ago Permalink

You can see your column collations in the Table Editor. And you can tell HeidiSQL that a file is UTF-8 in the "Load SQL File" dialog.

Please login to leave a reply, or register at first.