Re: BUG #18735: Specific multibyte character in psql file path command parameter for Windows
Koichi Suzuki <koichi.dbms@gmail.com>
From: Koichi Suzuki <koichi.dbms@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tatsuo Ishii <ishii@postgresql.org>, pgsql-bugs@lists.postgresql.org
Date: 2024-12-06T06:13:30Z
Lists: pgsql-bugs
Hello; We need to investigate how backslash in the latter byte of Shift-JIS encoded string is handled in psql. --- Koichi Suzuki https://www.linkedin.com/in/koichidbms 2024年12月6日(金) 15:11 Koichi Suzuki <koichi.dbms@gmail.com>: > In the Japanese version of Windows, file names are in Shift-JIS. > > For sure, we need to check client_encoding. > > Regards; > --- > Koichi Suzuki > https://www.linkedin.com/in/koichidbms > > > > 2024年12月6日(金) 14:44 Tom Lane <tgl@sss.pgh.pa.us>: > >> Tatsuo Ishii <ishii@postgresql.org> writes: >> >> This might mean that it'd be okay to just skip the backslash-to-slash >> >> conversion loops altogether if we think the encoding is Shift-JIS. >> >> > I suggest to not do so because majority of Shift-JIS users treat 0x5C >> > as a backslash. They understand that a 0x5C means a backslash in >> > Shift-JIS files if the files are for programming (source code) or for >> > the technical documentations and so on. >> >> Sure, we can do it that way. I think the hard part is figuring >> out whether Windows thinks the file names are in Shift-JIS. >> Do you have any idea about finding that out? >> >> 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