Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus" <kobruleht2(at)hot(dot)ee>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore
Date: 2020-03-29 00:42:58
Message-ID: 22672.1585442578@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus" <kobruleht2(at)hot(dot)ee> writes:
> Postgres 12 database dump is created in Debian 10 using pg_dump .
> Trying to restore it in Windows 10 using
> pg_restore --clean --create --if-exists --dbname=postgres --jobs=8 --no-password
> mydb.backup
> produces strange message
> pg_restore: WARNING: could not determine encoding for locale "et_EE.UTF-8":
> codeset is "CPUTF-8"

> How to fix this ?

Generally speaking, locale names from Unix systems won't work at all on
Windows. You need to create the database manually with whatever seems
to be the closest Windows locale match, and then restore its contents
without using --create.

(I do agree that that message isn't the most helpful thing. It looks
like chklocale.c is overoptimistically assuming that what it's handed
is valid, even if GetLocaleInfoEx says it isn't.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2020-03-29 01:33:47 Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore
Previous Message Adrian Klaver 2020-03-28 23:08:04 Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore