Re: Problems with a custom LOCALE - Mailing list pgsql-general

From Tom Lane
Subject Re: Problems with a custom LOCALE
Date
Msg-id 8460.1355524827@sss.pgh.pa.us
Whole thread Raw
In response to Problems with a custom LOCALE  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
Responses Re: Problems with a custom LOCALE  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
List pgsql-general
"James B. Byrne" <byrnejb@harte-lyne.ca> writes:
> PG::Error: ERROR:  encoding "UTF8" does not match locale
> "en_CA@yyyy-mmm-dd.UTF-8"
> DETAIL:  The chosen LC_CTYPE setting requires encoding "LATIN1".
> : CREATE DATABASE "hll_th_forex_test" ENCODING = 'UTF8' TEMPLATE =
> "template1"

> I am constructing this remotely using a Rake task borrowed from Ruby
> on Rails 3.2.9 and employing ActiveRecord-3.2.9.  We use a custom
> local on all our servers "en_CA@yyyy-mmm-dd.UTF-8" which differs from
> en_CA only in the presentation of the date.

Sorta looks like you based that locale on an ISO 8859-1 locale, not a
UTF8 locale.  AFAICT from looking at the code, PG is seeing that
nl_langinfo(CODESET) returns "ISO-8859-1" or some variant spelling,
so it complains.

            regards, tom lane


pgsql-general by date:

Previous
From: "James B. Byrne"
Date:
Subject: Problems with a custom LOCALE
Next
From: David Noel
Date:
Subject: Re: initdb error