moved ez spanish site - charset problem

Author Message

juan uribe

Friday 20 March 2009 10:54:07 am

ok, this is my story I moved\migrated a site from postgres to mysql.

http://www.lanacion.com.co

the procedure I followed was: 1) installed a fresh ez onto mysql 2) backed up schema of the mysql database 3) droped mysql database 4) recreated database using script. <i>Note: I made sure everything was utf8.</i> 5) backed up postgres database, only data with full inserts 6) restored data from postgres onto the new mysql database. 7) modified site.ini.append.php to point to the new database.

Now the site runs :) but the restored data, all accents (á,é,í,ó,ú,ü,ñ) are displayed wrong for example insted of:
‘Caquetá rumbo al Emprendimiento’
I get:
•â€˜Caquetá rumbo al Emprendimiento’

Now this is for the migrated data, but the new data or if I edit and correct it manually it comes out correctly.

I thought it was a problem with scripts, debuged this a lot, I thought it might have been the editing of these with vi :( but after many hours I dicided to create a very simple test page.

http://www.lanacion.com.co/paginaPrueba.php

$con = mysql_connect("localhost","username","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("ezLaNacion", $con);

$result = mysql_query("SELECT * FROM ezcontentobject");
echo "<h1>Nueva Pagina</h1>";
while($row = mysql_fetch_array($result))
  {
  echo $row['name'];
  echo "<br />";
  }

mysql_close($con);

this shows all the old stuff correct but the new stuff wrong... From this I conclude that I´m missing some setting some where, in ez...

Please help as this is a daily local news paper and every day that goes by it the problem, will be worst to fix.

By the way stay of postgres for big ezflow sites !!!! I hope the instructions for migrating, will be of help, as this has taken my over 2weeks to figure out !!!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.