coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upgrading => Topic started by: andreseso on March 23, 2006, 11:36:26 PM

Title: Upgrade from CPG 1.3 to CPG 1.4.4 with change of character set
Post by: andreseso on March 23, 2006, 11:36:26 PM
Hello,

Before I started the upgrade procedure I did a mysqldump with mysqldump -Q --opt -uUser -pPass DBName > cpg.sql

I backed up includes/config.php, my albums directory and the one other file mentioned.  I rsynced my 1.4.4 files over the old installation and I restored the stuff I had backed up. I ran the update.php and switched the language to the original Spanish it was in.  The new Spanish language file was in UTF-8 and my character encodings were latin1 so I had the accents on the CPG options horribly wrong.  I changed the character set in configuration to Utf-8.  Now the accents in the comments of my pictures and albums appeared as question marks.  The data stored in the database was in latin-1.

I then proceeded to convert the mysqldump from latin-1 to utf-8iconv --output cpb-utf8.sql -f latin1 -tutf-8 cpg.sql

I imported the database into mysqlmysql -uUser -pPass database < cpg-utf8.sql

I received a fatal error.  The database had been overwritten with the 1.3.X database.  I executed again update.php and it worked correctly

My charset is now UTF-8, and my accents are displayed correctly.

Result in http://andreso.net/galeria