]> granicus.if.org Git - postgresql/commitdiff
Fix pg_wchar_table's maxmblen field of EUC_CN, EUC_TW, MULE_INTERNAL
authorTatsuo Ishii <ishii@postgresql.org>
Mon, 26 Mar 2007 11:53:50 +0000 (11:53 +0000)
committerTatsuo Ishii <ishii@postgresql.org>
Mon, 26 Mar 2007 11:53:50 +0000 (11:53 +0000)
and GB18030. patches from ITAGAKI Takahiro.

src/backend/utils/mb/wchar.c

index 53489cf62c3832400f08cd14e525da55fda047ad..8c0e338c16938ddeecf1aeddbc62337269c1473b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * conversion functions between pg_wchar and multibyte streams.
  * Tatsuo Ishii
- * $Id: wchar.c,v 1.34.2.3 2007/01/24 17:12:41 tgl Exp $
+ * $Id: wchar.c,v 1.34.2.4 2007/03/26 11:53:50 ishii Exp $
  *
  * WIN1250 client encoding updated by Pavel Behal
  *
@@ -940,12 +940,12 @@ pg_utf8_islegal(const unsigned char *source, int length)
 pg_wchar_tbl pg_wchar_table[] = {
        {pg_ascii2wchar_with_len, pg_ascii_mblen, pg_ascii_verifier, 1},                /* 0; PG_SQL_ASCII      */
        {pg_eucjp2wchar_with_len, pg_eucjp_mblen, pg_eucjp_verifier, 3},                /* 1; PG_EUC_JP */
-       {pg_euccn2wchar_with_len, pg_euccn_mblen, pg_euccn_verifier, 3},                /* 2; PG_EUC_CN */
+       {pg_euccn2wchar_with_len, pg_euccn_mblen, pg_euccn_verifier, 2},                /* 2; PG_EUC_CN */
        {pg_euckr2wchar_with_len, pg_euckr_mblen, pg_euckr_verifier, 3},                /* 3; PG_EUC_KR */
-       {pg_euctw2wchar_with_len, pg_euctw_mblen, pg_euctw_verifier, 3},                /* 4; PG_EUC_TW */
+       {pg_euctw2wchar_with_len, pg_euctw_mblen, pg_euctw_verifier, 4},                /* 4; PG_EUC_TW */
        {pg_johab2wchar_with_len, pg_johab_mblen, pg_johab_verifier, 3},                /* 5; PG_JOHAB */
        {pg_utf2wchar_with_len, pg_utf_mblen, pg_utf8_verifier, 3},     /* 6; PG_UNICODE */
-       {pg_mule2wchar_with_len, pg_mule_mblen, pg_mule_verifier, 3}, /* 7; PG_MULE_INTERNAL */
+       {pg_mule2wchar_with_len, pg_mule_mblen, pg_mule_verifier, 4}, /* 7; PG_MULE_INTERNAL */
        {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_verifier, 1},             /* 8; PG_LATIN1 */
        {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_verifier, 1},             /* 9; PG_LATIN2 */
        {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_verifier, 1},             /* 10; PG_LATIN3 */
@@ -971,7 +971,7 @@ pg_wchar_tbl pg_wchar_table[] = {
        {0, pg_gbk_mblen, pg_gbk_verifier, 2},          /* 30; PG_GBK */
        {0, pg_uhc_mblen, pg_uhc_verifier, 2},          /* 31; PG_UHC */
        {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_verifier, 1},             /* 32; PG_WIN1250 */
-       {0, pg_gb18030_mblen, pg_gb18030_verifier, 2}   /* 33; PG_GB18030 */
+       {0, pg_gb18030_mblen, pg_gb18030_verifier, 4}   /* 33; PG_GB18030 */
 };
 
 /* returns the byte length of a word for mule internal code */