Installation scrambled all accented chars

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
saltydog
Power Poster
Power Poster
Posts: 281
Joined: Fri Mar 04, 2005 9:06 am

Installation scrambled all accented chars

Post by saltydog »

On one of my sites I have just upgraded from 1.10.3 to 1.11 but I had the very bad to surprise that all accented chars in the whole database has been replaced by garbled characters!
This is a big problem... Collation is latin1_swedish_ci...
zigge
Forum Members
Forum Members
Posts: 75
Joined: Tue Jan 22, 2008 6:53 pm

Re: Installation scrambled all accented chars

Post by zigge »

My upgrades from 1.10.2 and 1.10.3 to 1.11 worked without these problems. Also using latin1_swedish_ci for collation(Swedish website).

Did you export/import to a new databse and the upgrade or did you upgrade right of on the existing database?

Your problem seems strange, and to mee seems more like a HTML/xHTML issue, since the upgrader does not touch the existing data or any DML on the tables in that sense.

Do you have an example?
saltydog
Power Poster
Power Poster
Posts: 281
Joined: Fri Mar 04, 2005 9:06 am

Re: Installation scrambled all accented chars

Post by saltydog »

zigge,

thanks for the reply.
In the meantime I have switched back to 1.10.3 and things got right, so I don't have an example. I have also investigated and found that the accented chars are garbled inside mysql tables: "en archè estì o logos" instead of "en archè estì o logos"...

But 1.10.3 will display them correctly (making a sort of decode/encode??) while 1.11 is displaying them as they are in the database.

I should correct things in mysql, but I don't know where to start from...
zigge
Forum Members
Forum Members
Posts: 75
Joined: Tue Jan 22, 2008 6:53 pm

Re: Installation scrambled all accented chars

Post by zigge »

Had this issue a year back when moving to another hosting company(export/import). Ended up with doing an export, search and replace on the garbled things, saved as Unicode, imported into database, and it was fixed. Less than an hours work really.

Also with the old hosting company, I had the same issue when exporting to CSV in FEU module. Added som string replace logic in the module code, but since my current provider uses a database with correct setting this is no longer neccessary.

If I where you, I would fix the data first.
zigge
Forum Members
Forum Members
Posts: 75
Joined: Tue Jan 22, 2008 6:53 pm

Re: Installation scrambled all accented chars

Post by zigge »

Btw, did your old config.php have any:

$config['default_encoding'] = 'utf-8';

And is it there in the new config.php?
zigge
Forum Members
Forum Members
Posts: 75
Joined: Tue Jan 22, 2008 6:53 pm

Re: Installation scrambled all accented chars

Post by zigge »

Btw, this is good reading. MySQL could even look at server locale....


http://www.bluebox.net/news/2009/07/mysql_encoding/
janvl
Power Poster
Power Poster
Posts: 983
Joined: Wed Aug 13, 2008 10:57 am

Re: Installation scrambled all accented chars

Post by janvl »

What you see has to do with an encoding-error. UTF8 uses 2 bytes for the encoding that is why you see two characters. I had that with another PHP-programm once.
Try this in your config.sys

$config['locale'] = 'es_ES.UTF8';

I hope it helps.

Jan
Locked

Return to “[locked] Installation, Setup and Upgrade”