"James B. Byrne" <byrnejb@harte-lyne.ca> writes:
> PG::Error: ERROR: new encoding (UTF8) is incompatible with the
> encoding of the template database (LATIN1)
> HINT: Use the same encoding as in the template database, or use
> template0 as template.
> : CREATE DATABASE "hll_th_forex_development" ENCODING = 'UTF-8'
> So, I now must specify a template in the database connection, where I
> did not need to before. Furthermore, the template I must use is
> template0 because regardless of what locale initdb is run in template1
> evidently is always created with LATIN1 encoding. At lease if there
> is a way to force template1 to utf8 during initdb I now lack the
> energy to discover it.
You could use initdb's -E option, but really it ought to default to the
charmap of the locale that prevails from its environment. I suspect
there's still something wonky about your custom locale. (But man,
your description of localedef is scary.)
regards, tom lane