I'm exporting and importing with HeidiSQL. Both databases are UTF-8, but he tables are Latin - Swedish for some reason. On Import, I've tried various combinations for the encoding. (This is a WordPress database.)
The problem is that non-latin characters (Cyrillic, quotation marks, ellipses and dashes) are replaced with 3-character odd characters. How do I do it right so the character sets line up.
How to get the character set right
Where do you see those "wrong" 3-chars approach? In Wordpress or HeidiSQL?
Which HeidiSQL version is it?
You could open the exported file with some text edior and watch out if that file is already broken. If yes, I guess the data in the existing database is already broken.
Which HeidiSQL version is it?
You could open the exported file with some text edior and watch out if that file is already broken. If yes, I guess the data in the existing database is already broken.
if "both databases are UTF-8, but he tables are Latin - Swedish for some reason" then your data is not using UTF-8: it's using Latin 1. The database encoding is just a default to use, e.g., when you create a table and don't specify a charset. In the Latin 1 charset it's impossible to store Cyrillic characters.
I'm using the latest nightly build of HeidiSQL.
When I view the source data in WordPress, I see left quotation marks, ellipses and Cyrillic.
Looking at the HeidiSQL export SQL file I see: CREATE TABLE ... DEFAULT CHARSET=latin1
When I look at the HeidiSQL export SQL file with Notepad++, I see stuff like:
…
If you can't see that, it's a capitol A with a tilde over it, a cent sign, a lower case a with grave, a comma, a logical not sign, another tilde A and a vertical bar.
which is the same things I see in the target WordPress blog.
Both WordPress installations were setup with UTF-8 as the character set.
Unfortunately, I cannot get at the original data any more.
When I view the source data in WordPress, I see left quotation marks, ellipses and Cyrillic.
Looking at the HeidiSQL export SQL file I see: CREATE TABLE ... DEFAULT CHARSET=latin1
When I look at the HeidiSQL export SQL file with Notepad++, I see stuff like:
…
If you can't see that, it's a capitol A with a tilde over it, a cent sign, a lower case a with grave, a comma, a logical not sign, another tilde A and a vertical bar.
which is the same things I see in the target WordPress blog.
Both WordPress installations were setup with UTF-8 as the character set.
Unfortunately, I cannot get at the original data any more.
via utf8-decoder
Please login to leave a reply, or register at first.