8000 Fix pg_wchar_table's maxmblen field of EUC_CN, EUC_TW, MULE_INTERNAL · danielcode/postgres@c442dc2 · GitHub
[go: up one dir, main page]

Skip to content

Commit c442dc2

Browse files
committed
Fix pg_wchar_table's maxmblen field of EUC_CN, EUC_TW, MULE_INTERNAL
and GB18030. patches from ITAGAKI Takahiro.
1 parent 6ce2ca3 commit c442dc2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backend/utils/mb/wchar.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* conversion functions between pg_wchar and multibyte streams.
33
* Tatsuo Ishii
4-
* $Id: wchar.c,v 1.30.2.4 2007/01/24 17:12:47 tgl Exp $
4+
* $Id: wchar.c,v 1.30.2.5 2007/03/26 11:59:37 ishii Exp $
55
*
66
* WIN1250 client encoding updated by Pavel Behal
77
*
@@ -939,12 +939,12 @@ pg_utf8_islegal(const unsigned char *source, int length)
939939
pg_wchar_tbl pg_wchar_table[] = {
940940
{pg_ascii2wchar_with_len, pg_ascii_mblen, pg_ascii_verifier, 1}, /* 0; PG_SQL_ASCII */
941941
{pg_eucjp2wchar_with_len, pg_eucjp_mblen, pg_eucjp_verifier, 3}, /* 1; PG_EUC_JP */
942-
{pg_euccn2wchar_with_len, pg_euccn_mblen, pg_euccn_verifier, 3}, /* 2; PG_EUC_CN */
942+
{pg_euccn2wchar_with_len, pg_euccn_mblen, pg_euccn_verifier, 2}, /* 2; PG_EUC_CN */
943943
{pg_euckr2wchar_with_len, pg_euckr_mblen, pg_euckr_verifier, 3}, /* 3; PG_EUC_KR */
944-
{pg_euctw2wchar_with_len, pg_euctw_mblen, pg_euctw_verifier, 3}, /* 4; PG_EUC_TW */
944+
{pg_euctw2wchar_with_len, pg_euctw_mblen, pg_euctw_verifier, 4}, /* 4; PG_EUC_TW */
945945
{pg_johab2wchar_with_len, pg_johab_mblen, pg_johab_verifier, 3}, /* 5; PG_JOHAB */
946946
{pg_utf2wchar_with_len, pg_utf_mblen, pg_utf8_verifier, 3}, /* 6; PG_UNICODE */
947-
{pg_mule2wchar_with_len, pg_mule_mblen, pg_mule_verifier, 3}, /* 7; PG_MULE_INTERNAL */
947+
{pg_mule2wchar_with_len, pg_mule_mblen, pg_mule_verifier, 4}, /* 7; PG_MULE_INTERNAL */
948948
{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_verifier, 1}, /* 8; PG_LATIN1 */
949949
{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_verifier, 1}, /* 9; PG_LATIN2 */
950950
{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_verifier, 1}, /* 10; PG_LATIN3 */
@@ -970,7 +970,7 @@ pg_wchar_tbl pg_wchar_table[] = {
970970
{0, pg_gbk_mblen, pg_gbk_verifier, 2}, /* 30; PG_GBK */
971971
{0, pg_uhc_mblen, pg_uhc_verifier, 2}, /* 31; PG_UHC */
972972
{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_verifier, 1}, /* 32; PG_WIN1250 */
973-
{0, pg_gb18030_mblen, pg_gb18030_verifier, 2} /* 33; PG_GB18030 */
973+
{0, pg_gb18030_mblen, pg_gb18030_verifier, 4} /* 33; PG_GB18030 */
974974
};
975975

976976
/* returns the byte length of a word for mule internal code */

0 commit comments

Comments
 (0)
0