303 #define DEF_ENC2NAME(name, codepage) { #name, PG_##name }
305 #define DEF_ENC2NAME(name, codepage) { #name, PG_##name, codepage }
454 "pg_enc2icu_tbl incomplete");
529 for (p =
key, np = newkey; *p !=
'\0'; p++)
531 if (isalnum((
unsigned char) *p))
533 if (*p >=
'A' && *p <=
'Z')
534 *np++ = *p +
'a' -
'A';
553 *last = base + nel - 1,
569 position = base + ((last - base) >> 1);
570 result =
key[0] - position->name[0];
574 result = strcmp(
key, position->name);
576 return position->encoding;
#define Assert(condition)
const char * pg_enc2gettext_tbl[]
StaticAssertDecl(lengthof(pg_enc2icu_tbl)==PG_ENCODING_BE_LAST+1, "pg_enc2icu_tbl incomplete")
const char * get_encoding_name_for_icu(int encoding)
const pg_enc2name pg_enc2name_tbl[]
int pg_char_to_encoding(const char *name)
static const char *const pg_enc2icu_tbl[]
int pg_valid_server_encoding_id(int encoding)
#define DEF_ENC2NAME(name, codepage)
int pg_valid_server_encoding(const char *name)
static const pg_encname pg_encname_tbl[]
int pg_valid_client_encoding(const char *name)
bool is_encoding_supported_by_icu(int encoding)
const char * pg_encoding_to_char(int encoding)
static char * clean_encoding_name(const char *key, char *newkey)
struct pg_encname pg_encname
#define PG_VALID_ENCODING(_enc)
#define PG_VALID_FE_ENCODING(_enc)
#define PG_VALID_BE_ENCODING(_enc)
#define PG_ENCODING_BE_LAST