From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stöcker Bernhard - aktivweb GmbH <bernhard.stoecker@aktivweb.de>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: bug report: initdb failure on Microsoft Windows if path to initdb contains special chars
Date: Tue, 04 Feb 2025 10:55:48 -0500
Message-ID: <642665.1738684548@sss.pgh.pa.us> (raw)
In-Reply-To: <5e8129efb9f44dbd8ee72323f0ed3f0a@aktivweb.de>
References: <5e8129efb9f44dbd8ee72323f0ed3f0a@aktivweb.de>
=?utf-8?B?U3TDtmNrZXIgQmVybmhhcmQgLSBha3RpdndlYiBHbWJI?= <bernhard.stoecker@aktivweb.de> writes:
> I’d like to report an issue concerning initdb on Microsoft Windows if running initdb.exe from a directory that contains special chars like German umlauts. The error message is: FATAL: invalid byte sequence for encoding "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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, bernhard.stoecker@aktivweb.de, pgsql-bugs@lists.postgresql.org
Subject: Re: bug report: initdb failure on Microsoft Windows if path to initdb contains special chars
In-Reply-To: <642665.1738684548@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox