1) Add support for GB18030.

2) Fix a bug about the handling of large objects.
This commit is contained in:
Hiroshi Inoue 2002-06-25 01:54:19 +00:00
parent 0b584830f0
commit 20241a4c54
3 changed files with 22 additions and 1 deletions

View file

@ -777,7 +777,7 @@ PGAPI_ParamData(
/* commit transaction if needed */ /* commit transaction if needed */
if (!ci->drivers.use_declarefetch && CC_is_in_autocommit(stmt->hdbc)) if (!ci->drivers.use_declarefetch && CC_is_in_autocommit(stmt->hdbc))
{ {
if (CC_commit(stmt->hdbc)) if (!CC_commit(stmt->hdbc))
{ {
stmt->errormsg = "Could not commit (in-line) a transaction"; stmt->errormsg = "Could not commit (in-line) a transaction";
stmt->errornumber = STMT_EXEC_ERROR; stmt->errornumber = STMT_EXEC_ERROR;

View file

@ -56,6 +56,7 @@ pg_CS CS_Table[] =
{ "GBK", GBK }, { "GBK", GBK },
{ "UHC", UHC }, { "UHC", UHC },
{ "WIN1250", WIN1250 }, { "WIN1250", WIN1250 },
{ "GB18030", GB18030 },
{ "OTHER", OTHER } { "OTHER", OTHER }
}; };
@ -239,6 +240,25 @@ pg_CS_stat(int stat,unsigned int character,int characterset_code)
stat = 0; stat = 0;
} }
break; 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: default:
{ {
stat = 0; stat = 0;

View file

@ -41,6 +41,7 @@
#define GBK 30 /* GBK */ #define GBK 30 /* GBK */
#define UHC 31 /* UHC */ #define UHC 31 /* UHC */
#define WIN1250 32 /* windows-1250 */ #define WIN1250 32 /* windows-1250 */
#define GB18030 33 /* GB18030 */
#define OTHER -1 #define OTHER -1
#define MAX_CHARACTERSET_NAME 24 #define MAX_CHARACTERSET_NAME 24