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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user