Re: Windows UTF8 system locale

2025-01-01 Thread Noah Misch
On Wed, Dec 25, 2024 at 06:55:51PM +0300, Vladlen Popolitov wrote: > This UTF-8 feature leads to annoying test failure > (010_dump_connstr). It's not merely an annoying test failure. On Windows configured with a multibyte system locale, anyone with CREATEDB privilege can name a database such that

Re: Windows UTF8 system locale

2024-12-25 Thread Vladlen Popolitov
Noah Misch писал(а) 2024-12-17 02:16: On Tue, Dec 17, 2024 at 02:29:59AM +1300, Thomas Munro wrote: On Sun, Dec 15, 2024 at 3:32 PM Noah Misch wrote: > For PostgreSQL, I expect the most obvious problems will arise for rolname and > datname containing non-UTF8. For example, pg_dumpall relies on

Re: Windows UTF8 system locale

2024-12-25 Thread Vladlen Popolitov
Noah Misch писал(а) 2024-12-17 02:16: I wasn't ready to believe it, but 010_dump_connstr indeed fails with GetACP()==932. We've had test coverage of this for 8+ years, so I gather few or no runs of the TAP suite on GetACP()==932 systems have ever happened. Wow. Here's how your particular ex

Re: Windows UTF8 system locale

2024-12-16 Thread Noah Misch
On Tue, Dec 17, 2024 at 02:29:59AM +1300, Thomas Munro wrote: > On Sun, Dec 15, 2024 at 3:32 PM Noah Misch wrote: > > For PostgreSQL, I expect the most obvious problems will arise for rolname > > and > > datname containing non-UTF8. For example, pg_dumpall relies on > > appendShellString() to ca

Re: Windows UTF8 system locale

2024-12-16 Thread Noah Misch
On Sun, Dec 15, 2024 at 06:43:35PM +0100, Michail Nikolaev wrote: > I have Win 11 with that feature enabled, 200_connstr.pl passes without any > issues, but 010_dump_connstr.pl fails, yes. > All other tests seem to be passing, at least without ICU enabled. > > 010_dump_connstr.pl log is attached.

Re: Windows UTF8 system locale

2024-12-16 Thread Thomas Munro
On Sun, Dec 15, 2024 at 3:32 PM Noah Misch wrote: > For PostgreSQL, I expect the most obvious problems will arise for rolname and > datname containing non-UTF8. For example, pg_dumpall relies on > appendShellString() to call pg_dump for arbitrary datname. pg_dumpall would > get "database ... doe

Re: Windows UTF8 system locale

2024-12-15 Thread Michail Nikolaev
Hello, Noah! I have Win 11 with that feature enabled, 200_connstr.pl passes without any issues, but 010_dump_connstr.pl fails, yes. All other tests seem to be passing, at least without ICU enabled. 010_dump_connstr.pl log is attached. Best regards, Mikhail. log.tgz Description: application/co

Windows UTF8 system locale

2024-12-14 Thread Noah Misch
Since ~2019, Windows has option "Beta: Use Unicode UTF-8 for worldwide language support". That option breaks the appendShellString() assumption that it can escape every byte except '\0', '\r'. and '\n'. Instead, process creation injects U+FFFD REPLACEMENT CHARACTER (UTF-8: ef bf bd) for each byte