mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Unset language-related locale settings in any case, otherwise psql will
speak in tongues and mess up the regression test diffs.
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.60 2009/02/11 14:03:42 petere Exp $
|
||||
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.61 2009/02/12 13:26:03 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -694,18 +694,25 @@ initialize_environment(void)
|
||||
unsetenv("LC_COLLATE");
|
||||
unsetenv("LC_CTYPE");
|
||||
unsetenv("LC_MONETARY");
|
||||
unsetenv("LC_MESSAGES");
|
||||
unsetenv("LC_NUMERIC");
|
||||
unsetenv("LC_TIME");
|
||||
unsetenv("LC_ALL");
|
||||
unsetenv("LANG");
|
||||
unsetenv("LANGUAGE");
|
||||
/* On Windows the default locale cannot be English, so force it */
|
||||
#if defined(WIN32) || defined(__CYGWIN__)
|
||||
putenv("LANG=en");
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Set translation-related settings to English; otherwise psql
|
||||
* will produce translated messages and produce diffs. (XXX If we
|
||||
* ever support translation of pg_regress, this needs to be moved
|
||||
* elsewhere, where psql is actually called.)
|
||||
*/
|
||||
unsetenv("LANGUAGE");
|
||||
unsetenv("LC_ALL");
|
||||
putenv("LC_MESSAGES=C");
|
||||
|
||||
/*
|
||||
* Set multibyte as requested
|
||||
*/
|
||||
|
Reference in New Issue
Block a user