gringao.
Le journal de
ToutEtRien
Le carnet · 4 octobre 2014

postgresql LC_CTYPE error

Une note conservée dans les archives. Les versions et commandes évoquées correspondent à sa date de publication.

When I was installing an app who used PostGreSQL I got this error :

DataError: encoding « UTF8 » does not match locale « en_US »
DETAIL: The chosen LC_CTYPE setting requires encoding « LATIN1 ».

Here is the solution :

/etc/init.d/postgresql-9.3 stop
pg_dropcluster --stop 9.3 main
pg_createcluster --locale en_US.UTF-8 --start 9.3 main
/etc/init.d/postgresql-9.3 start