Re: BUG #18735: Specific multibyte character in psql file path command parameter for Windows
Koichi Suzuki <koichi.suzuki@enterprisedb.com>
From: Koichi Suzuki <koichi.suzuki@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tatsuo Ishii <ishii@postgresql.org>, koichi.dbms@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2025-01-28T06:34:17Z
Lists: pgsql-bugs
Hello Here; My colleagues in EDB kindly built PG 17.2 test installer for WIndows with Tom's patch. I ran this in my Windows environment and the patch looks to work fine. Anybody can download this package from https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot12926810582.1090.1.7c5fded.3-windows-x64.exe for test. Hope this is helpful. If possible, I'd like to ask to commit Tom's patch, not only to the latest major but also to older majors. Regards; --- *Koichi Suzuki* Senior Principal Support Engineer On Mon, Dec 9, 2024 at 5:33 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Tatsuo Ishii <ishii@postgresql.org> writes: > >> Another way, given that we only really need this to work for > >> SJIS, is to hard-wire the logic into path.c --- it's not like > >> pg_sjis_mblen is either long or likely to change. That's > >> ugly but would be a lot less invasive and safer to back-patch. > >> I'm leaning a bit to the second way, mainly because of the > >> extern-relocation annoyance. > > > +1. I believe the logic of detecting byte length in Shift-JIS will not > > be changed. > > OK. I know I said I wasn't going to write this, but here's a draft > patch that assumes we need only touch psql and can rely on its idea > of client_encoding. > > I'm not in a position to test this. > > regards, tom lane > >
Commits
-
Avoid breaking SJIS encoding while de-backslashing Windows paths.
- b17e3970c1ac 15.11 landed
- 998c4fc7c2c8 16.7 landed
- 98df8bace8a3 13.19 landed
- 6cddecdfb00b 18.0 landed
- 54f9afea7a7d 14.16 landed
- 0b713b94b3b0 17.3 landed