Re: Reject Windows command lines not convertible to system locale - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Reject Windows command lines not convertible to system locale
Date
Msg-id CA+hUKGKXLu=p36gFbaJ7ic+O+eDWw4U8+FqQP=vt7=4MQ=Tn2w@mail.gmail.com
Whole thread Raw
In response to Re: Reject Windows command lines not convertible to system locale  (Noah Misch <noah@leadboat.com>)
List 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).



pgsql-hackers by date:

Previous
From: Vladimír Houba jr.
Date:
Subject: transaction priority feature request
Next
From: Andres Freund
Date:
Subject: Re: pg_attribute_noreturn(), MSVC, C11