1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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.
This commit is contained in:
bar@mysql.com
2005-12-12 21:42:09 +04:00
parent dd7d2d0a11
commit 9ac6e558d4
21 changed files with 122 additions and 56 deletions

View File

@@ -220,7 +220,7 @@ static int my_mb_wc_bin(CHARSET_INFO *cs __attribute__((unused)),
const unsigned char *end __attribute__((unused)))
{
if (str >= end)
return MY_CS_TOOFEW(0);
return MY_CS_TOOSMALL;
*wc=str[0];
return 1;