mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Tell gettext which codeset to use by calling bind_textdomain_codeset(). We
already did that on Windows, but it's needed on other platforms too when LC_CTYPE=C. With other locales, we enforce (or trust) that the codeset of the locale matches the server encoding so we don't need to bind it explicitly. It should do no harm in that case either, but I don't have full faith in the PG encoding -> OS codeset mapping table yet. Per recent discussion on pgsql-hackers.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.188 2009/02/18 15:58:41 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.189 2009/04/08 09:50:48 heikki Exp $
|
||||
*
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
@ -265,6 +265,9 @@ CheckMyDatabase(const char *name, bool am_superuser)
|
||||
SetConfigOption("lc_collate", collate, PGC_INTERNAL, PGC_S_OVERRIDE);
|
||||
SetConfigOption("lc_ctype", ctype, PGC_INTERNAL, PGC_S_OVERRIDE);
|
||||
|
||||
/* Use the right encoding in translated messages */
|
||||
pg_bind_textdomain_codeset(textdomain(NULL));
|
||||
|
||||
/*
|
||||
* Lastly, set up any database-specific configuration variables.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user