Re: BUG #16926: initdb fails on Windows when binary path contains certain non-ASCII characters

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eirik Bakke <ebakke(at)ultorg(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16926: initdb fails on Windows when binary path contains certain non-ASCII characters
Date: 2021-03-15 16:06:16
Message-ID: 3009595.1615824376@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Eirik Bakke <ebakke(at)ultorg(dot)com> writes:
> The installation path can certainly be represented in UTF-8, but a character set conversion is necessary. Wouldn't "SET CLIENT_ENCODING" accomplish this? For example, couldn't initdb in this case do a "SET CLIENT_ENCODING TO 'Windows-1252'" before issuing the COPY command?

The issues are (1) how should initdb know that the path name ought to be
taken as WIN1252, rather than some other encoding? And then (2) how
should the backend know that it must convert the path-name-represented-
in-UTF8 to WIN1252 before passing it to the file system? The lack of
any standardization about what encoding file names are in is the core
of the difficulty.

I don't know much about Windows, so it's possible that there actually
are platform-specific ways to answer these questions. But it's a generic
problem, and we're unlikely to be interested in building a single-platform
fix.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-03-15 16:12:59 Re: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head
Previous Message PG Bug reporting form 2021-03-15 14:19:57 BUG #16927: Postgres can`t access WAL files