Jillian Koskie wrote:
> I'm moving an application from CF 5 to CFMX... and I'm having a problem
> with some of my data.
>
> The database is PostgreSQL.

For posterity:

The database was originally using the encoding SQL-ASCII. With CF
5 this results in characters with accents being treated as
opaque, while in CF MX this will throw exceptions in the driver.
The solution is to convert the database from SQL-ASCII to unicode.

In order to do that:
- use pg_dump to dump the current database to a flat file
- open the flat file in an encoding aware text editor and save it
as UTF-8 (or use a dedicated conversion utility)
- create a new database with encoding unicode
- use pg_restore to load the dump into the new database
- verify that everything works well from the new database
- verify again :)
- rename the old and the new databases

Jochem
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to