1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-11 05:52:26 +03:00

ctype_sjis.result, ctype_sjis.test, ctype-sjis.c:

Bug #6223 Japanese half-width kana characters get truncated. Bytes 0xA1..0xDF were not treated as a single byte sequence in a mistake.
This commit is contained in:
bar@mysql.com
2004-11-02 09:00:46 +04:00
parent 4768c83872
commit bc6bbebbc8
3 changed files with 29 additions and 2 deletions

View File

@@ -4581,14 +4581,19 @@ uint my_well_formed_len_sjis(CHARSET_INFO *cs __attribute__((unused)),
*/
if (((int8)b[0]) >= 0)
{
/* Single byte character */
b+= 1;
/* Single byte ascii character */
b++;
}
else if (issjishead((uchar)*b) && (e-b)>1 && issjistail((uchar)b[1]))
{
/* Double byte character */
b+= 2;
}
else if (((uchar)*b) >= 0xA1 && ((uchar)*b) <= 0xDF)
{
/* Half width kana */
b++;
}
else
{
/* Wrong byte sequence */