pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eirik Bakke <ebakke@ultorg.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #16926: initdb fails on Windows when binary path contains certain non-ASCII characters
Date: Mon, 15 Mar 2021 12:06:16 -0400
Message-ID: <3009595.1615824376@sss.pgh.pa.us> (raw)
In-Reply-To: <BL0PR20MB2098E0C32AAB397E33840828A16C9@BL0PR20MB2098.namprd20.prod.outlook.com>
References: <16926-e4ef345545d185ab@postgresql.org>
	<2932627.1615761527@sss.pgh.pa.us>
	<BL0PR20MB2098E0C32AAB397E33840828A16C9@BL0PR20MB2098.namprd20.prod.outlook.com>

Eirik Bakke <ebakke@ultorg.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





view thread (5+ messages)  latest in thread

Message-ID: <3009595.1615824376@sss.pgh.pa.us>
Permalink:  ../3009595.1615824376@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3009595.1615824376@sss.pgh.pa.us

 · 

reply

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, ebakke@ultorg.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16926: initdb fails on Windows when binary path contains certain non-ASCII characters
  In-Reply-To: <3009595.1615824376@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