File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 4
4
* (currently mule internal code (mic) is used)
5
5
* Tatsuo Ishii
6
6
*
7
- * $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.80 2009/03/08 16:07:12 alvherre Exp $
7
+ * $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.81 2009/03/08 18:10:16 alvherre Exp $
8
8
*/
9
9
#include "postgres.h"
10
10
@@ -891,17 +891,20 @@ SetDatabaseEncoding(int encoding)
891
891
DatabaseEncoding = & pg_enc2name_tbl [encoding ];
892
892
Assert (DatabaseEncoding -> encoding == encoding );
893
893
894
+ #ifdef ENABLE_NLS
894
895
pg_bind_textdomain_codeset (textdomain (NULL ), encoding );
896
+ #endif
895
897
}
896
898
897
899
/*
898
900
* On Windows, we need to explicitly bind gettext to the correct
899
901
* encoding, because gettext() tends to get confused.
900
902
*/
903
+ #ifdef ENABLE_NLS
901
904
void
902
905
pg_bind_textdomain_codeset (const char * domainname , int encoding )
903
906
{
904
- #if defined( ENABLE_NLS ) && defined( WIN32 )
907
+ #ifdef WIN32
905
908
int i ;
906
909
907
910
for (i = 0 ; i < lengthof (codeset_map_array ); i ++ )
@@ -916,6 +919,7 @@ pg_bind_textdomain_codeset(const char *domainname, int encoding)
916
919
}
917
920
#endif
918
921
}
922
+ #endif
919
923
920
924
void
921
925
SetDefaultClientEncoding (void )
Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.85 2009/03/08 16:07:12 alvherre Exp $
9
+ * $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.86 2009/03/08 18:10:17 alvherre Exp $
10
10
*
11
11
* NOTES
12
12
* This is used both by the backend and by libpq, but should not be
@@ -392,7 +392,9 @@ extern const char *pg_get_client_encoding_name(void);
392
392
extern void SetDatabaseEncoding (int encoding );
393
393
extern int GetDatabaseEncoding (void );
394
394
extern const char * GetDatabaseEncodingName (void );
395
+ #ifdef ENABLE_NLS
395
396
extern void pg_bind_textdomain_codeset (const char * domainname , int encoding );
397
+ #endif
396
398
397
399
extern int pg_valid_client_encoding (const char * name );
398
400
extern int pg_valid_server_encoding (const char * name );
You can’t perform that action at this time.
0 commit comments