Re: Windows locales and tests portability - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Windows locales and tests portability
Date
Msg-id CA+hUKGK8Mru903e+ETdi8-cuoMLDFcggyE4ZzSuJtu9oVaUZmg@mail.gmail.com
Whole thread
In response to Windows locales and tests portability  (Andrey Borodin <x4mmm@yandex-team.ru>)
List pgsql-hackers
On Fri, Feb 6, 2026 at 8:03 PM Andrey Borodin <x4mmm@yandex-team.ru> wrote:
> Windows MSVC strtod(): seems to ignore environment variables entirely and use the system's regional settings (Russian
locale,) 

Hmm, right, we probably do setlocale(..., ""), which gets you an
"implementation-defined native environment", and Windows implements
that as you say.  I suppose if we wanted it to work like Unix, we
could call getenv("LC_XXX") and feed the results to setlocale()
ourselves... maybe a terrible idea, IDK.



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [PING] fallocate() causes btrfs to never compress postgresql files
Next
From: "Euler Taveira"
Date:
Subject: Re: log_min_messages per backend type