Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4022f94c
Commit
4022f94c
authored
Mar 08, 2009
by
Alvaro Herrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pg_bind_textdomain_codeset must exist only on ENABLE_NLS.
parent
fb2ebae4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
src/backend/utils/mb/mbutils.c
src/backend/utils/mb/mbutils.c
+6
-2
src/include/mb/pg_wchar.h
src/include/mb/pg_wchar.h
+3
-1
No files found.
src/backend/utils/mb/mbutils.c
View file @
4022f94c
...
...
@@ -4,7 +4,7 @@
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
*
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.8
0 2009/03/08 16:07:12
alvherre Exp $
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.8
1 2009/03/08 18:10:16
alvherre Exp $
*/
#include "postgres.h"
...
...
@@ -891,17 +891,20 @@ SetDatabaseEncoding(int encoding)
DatabaseEncoding
=
&
pg_enc2name_tbl
[
encoding
];
Assert
(
DatabaseEncoding
->
encoding
==
encoding
);
#ifdef ENABLE_NLS
pg_bind_textdomain_codeset
(
textdomain
(
NULL
),
encoding
);
#endif
}
/*
* On Windows, we need to explicitly bind gettext to the correct
* encoding, because gettext() tends to get confused.
*/
#ifdef ENABLE_NLS
void
pg_bind_textdomain_codeset
(
const
char
*
domainname
,
int
encoding
)
{
#if
defined(ENABLE_NLS) && defined(WIN32)
#if
def WIN32
int
i
;
for
(
i
=
0
;
i
<
lengthof
(
codeset_map_array
);
i
++
)
...
...
@@ -916,6 +919,7 @@ pg_bind_textdomain_codeset(const char *domainname, int encoding)
}
#endif
}
#endif
void
SetDefaultClientEncoding
(
void
)
...
...
src/include/mb/pg_wchar.h
View file @
4022f94c
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.8
5 2009/03/08 16:07:12
alvherre Exp $
* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.8
6 2009/03/08 18:10:17
alvherre Exp $
*
* NOTES
* 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);
extern
void
SetDatabaseEncoding
(
int
encoding
);
extern
int
GetDatabaseEncoding
(
void
);
extern
const
char
*
GetDatabaseEncodingName
(
void
);
#ifdef ENABLE_NLS
extern
void
pg_bind_textdomain_codeset
(
const
char
*
domainname
,
int
encoding
);
#endif
extern
int
pg_valid_client_encoding
(
const
char
*
name
);
extern
int
pg_valid_server_encoding
(
const
char
*
name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment