Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jIM2o-0000nd-Kr for pgsql-general@arkaria.postgresql.org; Sun, 29 Mar 2020 00:43:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jIM2l-0001ii-NO for pgsql-general@arkaria.postgresql.org; Sun, 29 Mar 2020 00:43:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jIM2l-0001Xu-55 for pgsql-general@lists.postgresql.org; Sun, 29 Mar 2020 00:43:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jIM2e-0004go-Fr for pgsql-general@postgresql.org; Sun, 29 Mar 2020 00:43:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 02T0gwg4022673; Sat, 28 Mar 2020 20:42:59 -0400 From: Tom Lane To: "Andrus" cc: "pgsql-general" Subject: Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore In-reply-to: References: Comments: In-reply-to "Andrus" message dated "Sat, 28 Mar 2020 23:39:49 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22671.1585442578.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 28 Mar 2020 20:42:58 -0400 Message-ID: <22672.1585442578@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Andrus" 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=3Dpostgres --jobs=3D8 -= -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