1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +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:
Heikki Linnakangas
2009-04-08 09:50:48 +00:00
parent baf048d7d2
commit 1fe5020558
4 changed files with 33 additions and 16 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.173 2009/03/08 16:07:12 alvherre Exp $
* $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.174 2009/04/08 09:50:48 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@ -1242,7 +1242,7 @@ pg_bindtextdomain(const char *domain)
get_locale_path(my_exec_path, locale_path);
bindtextdomain(domain, locale_path);
pg_bind_textdomain_codeset(domain, GetDatabaseEncoding());
pg_bind_textdomain_codeset(domain);
}
#endif
}