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 1tKEfo-007bmW-9D for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Dec 2024 10:38:00 +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 1tKEfj-001BE3-Ke for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Dec 2024 10:37:56 +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 1tKEfj-001BDq-1Z for pgsql-bugs@lists.postgresql.org; Sun, 08 Dec 2024 10:37:56 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tKEfg-001eNm-3a for pgsql-bugs@lists.postgresql.org; Sun, 08 Dec 2024 10:37:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=nvCHdr4hhEMZ5phy66sZyKNHlLM9xb2p6P6HAbMAd7A=; b=a/l7CYnE12B5DvK6PBvPaCm/KX 80oEDipzuzHXQ+rII+U7XkTZjVnC5Wxd5K4WbeDFF4fL+QiS9MiIlAZyHiqQVhCXrzPeQQiUpjTN2 OyH5P6iMcbVZkE47vdO1k4AAAkF36lSa1NT15qSXiAmPjyb0YMLdBtC0f516jQLNtPB6igdIfAtbF 9Sz1VdxRTAg1HkLjTpUEHMf1gUTwQxoM5RaJyGUMsT4IxjW2qKUP+oJak8AC3657nVunSIjAfqcNA lfbp4VnQ2HF2fWjfsCKypHrRHBBi89VSqYlGD0UcQO8hBmyJpYOzJXghKmmkuO1KXSHBWpkHIuRP0 WCRZigHQ==; Received: from [2409:11:4120:300:d108:e509:d471:d21b] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1tKEfa-0055D4-Ad; Sun, 08 Dec 2024 10:37:49 +0000 Date: Sun, 08 Dec 2024 19:37:36 +0900 (JST) Message-Id: <20241208.193736.1748337256420999108.ishii@postgresql.org> To: tgl@sss.pgh.pa.us Cc: koichi.dbms@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18735: Specific multibyte character in psql file path command parameter for Windows From: Tatsuo Ishii In-Reply-To: <3066301.1733530061@sss.pgh.pa.us> References: <2840430.1733510664@sss.pgh.pa.us> <20241207.081412.2050532354647835961.ishii@postgresql.org> <3066301.1733530061@sss.pgh.pa.us> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:d108:e509:d471:d21b (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > That was what I was thinking yesterday, but seems to me it could > not really work to have client_encoding set to UTF-8 while you're > trying to type an SJIS file name. Even if your terminal program > doesn't mangle anything, it's likely that psqlscan.l will. Ok. So if the client encoding is not a "safe" encoding like Shift-JIS, we have to use the same encoding for both the client encoding and the file system encoding. I don't think this is an unreasonable limitation. > I suppose if we think that's the situation, we could try to translate > the file path names from UTF8 to SJIS. But that's a chunk of > functionality that doesn't exist right now, plus I'm afraid it'd > often make things worse not better. We don't have nearly as much > certainty as we could wish about which encoding incoming data is in. Yes. Also in PostgreSQL encoding conversion is extensible and the feature is only available in backend. Best reagards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp