#include "postgres.h"
#include <langinfo.h>
#include "mb/pg_wchar.h"
Go to the source code of this file.
◆ pg_get_encoding_from_locale()
int pg_get_encoding_from_locale |
( |
const char * |
ctype, |
|
|
bool |
write_message |
|
) |
| |
Definition at line 305 of file chklocale.c.
326 loc = newlocale(LC_CTYPE_MASK, ctype, (
locale_t) 0);
330 sys = nl_langinfo_l(CODESET, loc);
336 sys = win32_get_codeset(ctype);
360 if (strlen(sys) == 0)
374 fprintf(stderr,
_(
"could not determine encoding for locale \"%s\": codeset is \"%s\""),
380 (
errmsg(
"could not determine encoding for locale \"%s\": codeset is \"%s\"",
static const struct encoding_match encoding_match_list[]
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
int pg_strcasecmp(const char *s1, const char *s2)
const char * system_enc_name
Referenced by cache_locale_time(), check_encoding_locale_matches(), check_locale_encoding(), main(), PGLC_localeconv(), pqConnectOptions2(), PQsetClientEncoding(), and setup_locale_encoding().
◆ encoding_match_list