diff options
author | unknown <bar@mysql.com> | 2004-11-02 09:00:46 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-11-02 09:00:46 +0400 |
commit | 46aa022aa6cf40801518d1be2c9e8e7ffcee9928 (patch) | |
tree | 5f953c9f96d2abde41643d8ded974d648bfef6f6 /strings | |
parent | f8a875a2389215191daeaba7d93ac61a564bdb27 (diff) | |
download | mariadb-git-46aa022aa6cf40801518d1be2c9e8e7ffcee9928.tar.gz |
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.
strings/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.
mysql-test/t/ctype_sjis.test:
Bug #6223 Japanese half-width kana characters get truncated. Bytes 0xA1..0xDF were not treated as a single byte sequence in a mistake.
mysql-test/r/ctype_sjis.result:
Bug #6223 Japanese half-width kana characters get truncated. Bytes 0xA1..0xDF were not treated as a single byte sequence in a mistake.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-sjis.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 4176ff2e538..a8b5394f8c5 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -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 */ |