On Jul 8, 2007, at 14:09 , Pat Maddox wrote:
Can I just convert it, or do I need to dump it, drop it, recreate with UTF-8, and then load the data?
It depends on what is currently in your (SQL_ASCII) database. If it's only ASCII data or all non-ASCII data is UTF-8, you should be okay just dumping the data and loading it into a new database with UTF8 encoding.
If this isn't the case, you'll need to clean the dump somehow, probably using iconv.
Also is it possible to change the default encoding for databases as well?
AFAIK, you can't change the default encoding after it's been set by initdb, but you can set the encoding at database creation time. See the CREATE DATABASE or createdb documentation on how to do this.
Michael Glaesemann grzm seespotcode net