Re: convert from latin1 to utf8

From: Scott Whitney <scott(at)journyx(dot)com>
To: Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: convert from latin1 to utf8
Date: 2013-10-10 23:07:56
Message-ID: tjk5oohe6o1g54d3we587607.1381446468103@email.android.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I needed both UTF8 and Latin-1. I accomplished this by initdb with the LOCALE set to C. That lets me create dbs "with template0 encoding='Latin-1'" as well as "encoding=UTF8," FWIW...

-------- Original message --------
From: Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu>
Date: 10/10/2013 5:39 PM (GMT-06:00)
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] convert from latin1 to utf8

I need to convert a bunch of my databases to utf8 before I can migrate them to postgresql 8.4. Is there a command that during the pg_dumpall process the encoding can be changed from latin1 to utf8?
 
This is the error I get when migrating the databases from 8.1 to a machine running 8.4
psql:pgdbs:215: ERROR:  encoding LATIN1 does not match locale en_US.UTF-8
DETAIL:  The chosen LC_CTYPE setting requires encoding UTF8.
 
Thanks

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message luckyjackgao 2013-10-11 07:24:59 Re: PostgreSQL 9.2 - pg_dump out of memory when backuping a database with 300000000 large objects
Previous Message Marc Fromm 2013-10-10 22:36:44 convert from latin1 to utf8