summaryrefslogtreecommitdiff
path: root/strings/ctype-big5.c
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-12-12 21:42:09 +0400
committerunknown <bar@mysql.com>2005-12-12 21:42:09 +0400
commita464e01713d19d358eb7feab2cfdf88bb274d5df (patch)
tree6c15cf077b53c2157ad83b68ecbe604863e5aabf /strings/ctype-big5.c
parent5aeb69296a4e134f0215da3e6bcce4956b7d76ad (diff)
downloadmariadb-git-a464e01713d19d358eb7feab2cfdf88bb274d5df.tar.gz
Bug#15375 Unassigned multibyte codes are broken
into parts when converting to Unicode. m_ctype.h: Reorganizing mb_wc return codes to be able to return "an unassigned N-byte-long character". sql_string.cc: Adding code to detect and properly handle unassigned characters (i.e. the those character which are correctly formed according to the character specifications, but don't have Unicode mapping). Many files: Fixing conversion function to return new codes. ctype_ujis.test, ctype_gbk.test, ctype_big5.test: Adding a test case. ctype_ujis.result, ctype_gbk.result, ctype_big5.result: Fixing results accordingly. include/m_ctype.h: Reorganizing mb_wc return codes to be able to return "an unassigned N-byte long character". Bug#15375 Unassigned multibyte codes are broken into parts when converting to Unicode. mysql-test/r/ctype_big5.result: Fixing results accordingly. mysql-test/r/ctype_gbk.result: Fixing results accordingly. mysql-test/r/ctype_ujis.result: Fixing results accordingly. mysql-test/t/ctype_big5.test: Adding a test case. mysql-test/t/ctype_gbk.test: Adding a test case. mysql-test/t/ctype_ujis.test: Adding a test case. sql/sql_string.cc: Adding code to detect and properly hanlde unassigned characters (i.e. the those character which are correctly formed according to the character specifications, but don't have Unicode mapping). strings/ctype-big5.c: Fixing conversion function to return new codes. strings/ctype-bin.c: Fixing conversion function to return new codes. strings/ctype-cp932.c: Fixing conversion function to return new codes. strings/ctype-euc_kr.c: Fixing conversion function to return new codes. strings/ctype-gb2312.c: Fixing conversion function to return new codes. strings/ctype-gbk.c: Fixing conversion function to return new codes. strings/ctype-latin1.c: Fixing conversion function to return new codes. strings/ctype-simple.c: Fixing conversion function to return new codes. strings/ctype-sjis.c: Fixing conversion function to return new codes. strings/ctype-tis620.c: Fixing conversion function to return new codes. strings/ctype-ucs2.c: Fixing conversion function to return new codes. strings/ctype-ujis.c: Fixing conversion function to return new codes. strings/ctype-utf8.c: Fixing conversion function to return new codes.
Diffstat (limited to 'strings/ctype-big5.c')
-rw-r--r--strings/ctype-big5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index e15554fa576..89a40b15288 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6259,7 +6259,7 @@ my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
int hi=s[0];
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
if (hi<0x80)
{
@@ -6268,10 +6268,10 @@ my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
}
if (s+2>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1])))
- return MY_CS_ILSEQ;
+ return -2;
return 2;
}