From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
Cc: | koichi(dot)dbms(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18735: Specific multibyte character in psql file path command parameter for Windows |
Date: | 2024-12-07 00:07:41 |
Message-ID: | 3066301.1733530061@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
> I think the encoding we need to supply to canonicalize_path() is not
> necessarily the same as client_encoding. For example we could set
> client_encoding to UTF-8 but use a file which has Shift-JIS encode
> file name. I think what we really need to supply to
> canonicalize_path() is the "file system encoding", not
> client_encoding.
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.
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.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robins Tharakan | 2024-12-07 11:42:07 | Re: Build failure with GCC 15 (defaults to -std=gnu23) |
Previous Message | Tatsuo Ishii | 2024-12-06 23:14:12 | Re: BUG #18735: Specific multibyte character in psql file path command parameter for Windows |