summaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/multibyte.c
diff options
context:
space:
mode:
authorHiroshi Inoue <inoue@tpf.co.jp>2002-06-25 01:54:19 +0000
committerHiroshi Inoue <inoue@tpf.co.jp>2002-06-25 01:54:19 +0000
commit20241a4c5477d0443c37ccef674c15cfdda37f9e (patch)
tree046663382e34b1c90b859be7c261b3bf852df5e3 /src/interfaces/odbc/multibyte.c
parent0b584830f0efef400ef26da58e5c17f14cece3e7 (diff)
1) Add support for GB18030.
2) Fix a bug about the handling of large objects.
Diffstat (limited to 'src/interfaces/odbc/multibyte.c')
-rw-r--r--src/interfaces/odbc/multibyte.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/interfaces/odbc/multibyte.c b/src/interfaces/odbc/multibyte.c
index e7a617bb812..17863a9ef5f 100644
--- a/src/interfaces/odbc/multibyte.c
+++ b/src/interfaces/odbc/multibyte.c
@@ -56,6 +56,7 @@ pg_CS CS_Table[] =
{ "GBK", GBK },
{ "UHC", UHC },
{ "WIN1250", WIN1250 },
+ { "GB18030", GB18030 },
{ "OTHER", OTHER }
};
@@ -239,6 +240,25 @@ pg_CS_stat(int stat,unsigned int character,int characterset_code)
stat = 0;
}
break;
+ /*Chinese GB18030 support.Added by Bill Huang <bhuang@redhat.com> <bill_huanghb@ybb.ne.jp>*/
+ case GB18030:
+ {
+ if (stat < 2 && character > 0x80)
+ stat = 2;
+ else if (stat = 2)
+ if (character >= 0x30 && character <= 0x39)
+ stat = 3;
+ else
+ stat = 1;
+ else if (stat = 3)
+ if (character >= 0x30 && character <= 0x39)
+ stat = 1;
+ else
+ stat = 3;
+ else
+ stat = 0;
+ }
+ break;
default:
{
stat = 0;