Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tfLHK-001cME-Hx for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Feb 2025 15:55:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tfLHJ-004yfQ-B3 for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Feb 2025 15:55:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tfLHJ-004yfH-2Z for pgsql-bugs@lists.postgresql.org; Tue, 04 Feb 2025 15:55:57 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tfLHF-0039KC-1y for pgsql-bugs@lists.postgresql.org; Tue, 04 Feb 2025 15:55:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 514FtmP6642666; Tue, 4 Feb 2025 10:55:48 -0500 From: Tom Lane To: =?utf-8?B?U3TDtmNrZXIgQmVybmhhcmQgLSBha3RpdndlYiBHbWJI?= cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: bug report: initdb failure on Microsoft Windows if path to initdb contains special chars In-reply-to: <5e8129efb9f44dbd8ee72323f0ed3f0a@aktivweb.de> References: <5e8129efb9f44dbd8ee72323f0ed3f0a@aktivweb.de> Comments: In-reply-to =?utf-8?B?U3TDtmNrZXIgQmVybmhhcmQgLSBha3RpdndlYiBHbWJI?= message dated "Tue, 04 Feb 2025 13:57:29 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <642664.1738684548.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 04 Feb 2025 10:55:48 -0500 Message-ID: <642665.1738684548@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =3D?utf-8?B?U3TDtmNrZXIgQmVybmhhcmQgLSBha3RpdndlYiBHbWJI?=3D writes: > I=E2=80=99d like to report an issue concerning initdb on Microsoft Windo= ws if running initdb.exe from a directory that contains special chars like= German umlauts. The error message is: FATAL: invalid byte sequence for en= coding "UTF8": 0xf6 0x63 0x6b The directory name contains those, you mean? Our position on this is that the data directory's path name has to be valid in the encoding you are selecting for the database. Otherwise it's just too much of a mess to deal with inside-the-database values like the data_directory setting. It looks like you are using some single-byte encoding (probably a Windows code page?) for your filesystem names, so you should do the same for initdb's -E option. Or switch to an all-ASCII path name. regards, tom lane