From d8aa9f591a3299cc023df898bf90b71debd57043 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Wed, 21 Sep 2005 20:26:17 +0000 Subject: [PATCH] Update multibyte encodings and mappings [Hiroshi Saito] --- multibyte.c | 14 ++++++++++++-- multibyte.h | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/multibyte.c b/multibyte.c index 68b0cdb..2df7947 100644 --- a/multibyte.c +++ b/multibyte.c @@ -29,6 +29,7 @@ pg_CS CS_Table[] = { "EUC_TW", EUC_TW }, { "JOHAB", JOHAB }, { "UNICODE", UTF8 }, + { "UTF8", UTF8 }, /* Corresponding from Version 8.1 */ { "MULE_INTERNAL",MULE_INTERNAL }, { "LATIN1", LATIN1 }, { "LATIN2", LATIN2 }, @@ -41,11 +42,14 @@ pg_CS CS_Table[] = { "LATIN9", LATIN9 }, { "LATIN10", LATIN10 }, { "WIN1256", WIN1256 }, - { "TCVN", TCVN }, + { "TCVN", WIN1258 }, + { "WIN1258", WIN1258 }, /* Corresponding from Version 8.1 */ { "WIN874", WIN874 }, { "KOI8", KOI8R }, { "WIN", WIN1251 }, - { "ALT", ALT }, + { "WIN1251", WIN1251 }, /* Corresponding from Version 8.1 */ + { "ALT", WIN866 }, + { "WIN866", WIN866 }, /* Corresponding from Version 8.1 */ { "ISO_8859_5", ISO_8859_5 }, { "ISO_8859_6", ISO_8859_6 }, { "ISO_8859_7", ISO_8859_7 }, @@ -400,6 +404,12 @@ CC_lookup_characterset(ConnectionClass *self) case 1250: wenc = "WIN1250"; break; + case 1251: + if (PG_VERSION_GE(self, 8.1)) + wenc = "WIN1251"; + else + wenc = "WIN"; + break; case 1252: if (PG_VERSION_GE(self, 7.2)) wenc = "latin9"; diff --git a/multibyte.h b/multibyte.h index ca96521..dcb5461 100644 --- a/multibyte.h +++ b/multibyte.h @@ -28,11 +28,11 @@ #define LATIN9 16 /* ISO-8859 Latin 9 */ #define LATIN10 17 /* ISO-8859 Latin 10 */ #define WIN1256 18 /* Arabic Windows */ -#define TCVN 19 /* Vietnamese Windows */ +#define WIN1258 19 /* Vietnamese Windows */ #define WIN874 20 /* Thai Windows */ #define KOI8R 21 /* KOI8-R/U */ #define WIN1251 22 /* windows-1251 */ -#define ALT 23 /* Alternativny Variant (MS-DOS CP866) */ +#define WIN866 23 /* Alternativny Variant (MS-DOS CP866) */ #define ISO_8859_5 24 /* ISO-8859-5 */ #define ISO_8859_6 25 /* ISO-8859-6 */ #define ISO_8859_7 26 /* ISO-8859-7 */ -- 2.39.5