Postgres - Migrating from Latin1 to UTF-8 and then upgrading to Drupal6
Hi!
I Have a Drupal 5.10 site, running on Postgres 8.2.9. Unfortuntately, the Drupal database was originally configured as LATIN1, and it has been used for more than a year, with more than 1600 articles published.
I was trying to upgrade do Drupal 6, but apparently it only works on UTF-8 databases, so I tried to convert my database, with no success. I´ve created a new database with UTF-8 enconding, and tried to convert data in two ways:
1) exporting the original database using pg_dump with "-E UTF-8" option, and importing it to the new database with psql
2) exporting the original database with no special option, converting the resulting file with "iconv", and importing it to the new database with psql
Both the ways gave me resulting databases with messed special characters, and later gave me php errors while viewing some pages.
Is there a known method of converting a Drupal database on Postgres from Latin1 to UTF-8? Or is there a way to upgrade do Drupal 6 while keeping the LATIN1 encoding?
Thanks in Advance,
Carlos.

Hi! Found the solution, wich
Hi!
Found the solution, wich is incredibly simple. It seems that Drupal 5 stores its data in UTF-8, even if the database encoding is set to Latin-1.
So, just running a pg_dump, opening the result file and modifying the "SET client_encoding = 'LATIN1'" to "SET client_encoding = 'UTF-8", and then restoring the dump file to a fresh database set to UTF-8 did the trick.
Regards,
Carlos.