Re: Reject Windows command lines not convertible to system locale

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@postgresql.org
Date: 2024-12-15T14:44:04Z
Lists: pgsql-hackers
On Sun, Dec 15, 2024 at 6:05 PM Noah Misch <noah@leadboat.com> wrote:
> On Sun, Dec 15, 2024 at 04:50:57PM +1300, Thomas Munro wrote:
> > For the all-ASCII test, why not us pg_is_ascii()?
>
> pg_is_ascii() takes a char[], but this has a wchar_t[].  Maybe I should wrap
> that part in a pg_wcs_is_ascii()?  (We can't use GetCommandLineA(), because
> "best fit" may have converted non-ASCII to ASCII.)

Right, sorry, brain fade.  No issue with the open-coding here if you
want an early exit (I'd be tempted to just not have it for simplicity
but no strong opinion).



Commits

  1. Test postmaster with program_options_handling_ok() et al.