Re: BUG #18735: Specific multibyte character in psql file path command parameter for Windows
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tatsuo Ishii <ishii@postgresql.org>
Cc: koichi.dbms@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2024-12-08T22:55:12Z
Lists: pgsql-bugs
Attachments
- v1-encoding-safe-canonicalize_path.patch (text/x-diff) patch v1
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