This also affects the result of the installation, even when using a valid locale.
If postgresql is installed in a terminal with LC_ALL="C", it is not possible to create unicode databases:
$ createdb -E UNICODE test
createdb: database creation failed: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
Specifying --locale when running pg_createcluster in the postinstall script will make the installation independent of the terminal.
This also affects the result of the installation, even when using a valid locale.
If postgresql is installed in a terminal with LC_ALL="C", it is not possible to create unicode databases:
$ createdb -E UNICODE test
createdb: database creation failed: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
Specifying --locale when running pg_createcluster in the postinstall script will make the installation independent of the terminal.