XF 1.2 Ä, Ö, umlauts and other characters after import

Nnirvi

Member
Hi!

After an otherwise successful import, nordics are messed up. The usual ä and stuff you get when character set is somehow wrong. My question is, how should I proceed? The database is now UTF-8 with collation UTF-8_general_ci. I tested switching the collation to latin_swedish - no go.

Do I need to import again or where should I start?
 
In general, this means that a character set has to be forced at the beginning of the import -- this often comes up when an import is done on a different server or a different configuration from where the data lay originally (thus different default connection character sets). It's not possible to automatically detect.

Normally, you need to force the charset to "latin1" at the import configuration stage if this happens. (This does involve redoing the import, which means either restoring to a pre-import backup or reinstalling XF.)
 
You can run queries to manipulate the data against the DB if you really want, but it will basically affect every field in the database that has non-basic ASCII characters in it.
 
Ok. I guess it's new import then. So are these correct:

The target db should be UTF-8?
The target db collation should be latin1_swedish_ci?
I should insert the option force character set to latin1? or latin1_swedish_ci?

The source vB database's collation is latin1_swedish_ci.
 
You can generally ignore DB table/collation in this case. The problem is likely that the old server had a connection character set of latin1 and the new server has utf8. This means that MySQL potentially converts the data to UTF-8 when we're expecting it to be in Windows-1252 (what vB uses as its charset), which leads to this double encoding.

Specifying latin1 at the import config prevents MySQL from doing that silent conversion.
 
On the same server I also have a Wordpress installation that displays everything fine. Also, new posts to the xF forum are displayed correctly

This does not necessarily mean that your server and browser uses the correct character set for the data in your new XenForo database. Maybe your Wordpress data is latin-1?

Since you now seem to have 2-byte characters, it looks for me like they are already UTF-8.
 
Back
Top Bottom