diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index e8c644b..e55835e 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -790,9 +790,16 @@ initialize_environment(void) unsetenv("LC_NUMERIC"); unsetenv("LC_TIME"); unsetenv("LANG"); - /* On Windows the default locale cannot be English, so force it */ -#if defined(WIN32) || defined(__CYGWIN__) - putenv("LANG=en"); + /* + * Most platforms have adopted the POSIX locale as their + * implementation-defined default locale. Exceptions include native + * Windows, Darwin with --enable-nls, and Cygwin with --enable-nls. + * (Use of --enable-nls matters because libintl replaces setlocale().) + * Also, PostgreSQL does not support Darwin with locale environment + * variables unset; see PostmasterMain(). + */ +#if defined(WIN32) || defined(__CYGWIN__) || defined(__darwin__) + putenv("LANG=C"); #endif }