summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <bar@bar.intranet.mysql.r18.ru>2004-03-25 14:29:56 +0400
committerunknown <bar@bar.intranet.mysql.r18.ru>2004-03-25 14:29:56 +0400
commit65bed530a8707081c203e1efd00f57cd7e3f0351 (patch)
tree66961a21a84d12cae3451369d10555a56d0e1054 /strings
parent92a50d2b69fcc6828790b2fbb62631c1d38918fc (diff)
downloadmariadb-git-65bed530a8707081c203e1efd00f57cd7e3f0351.tar.gz
#3290: Can't convert sjis&ujis half-width katakana correctly
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-sjis.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index c337b8122fb..8ba650d1486 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -4437,6 +4437,12 @@ my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
if (!(code=func_uni_sjis_onechar(wc)))
return MY_CS_ILUNI;
+ if (code>=0xA1 && code <= 0xDF)
+ {
+ s[0]= code;
+ return 1;
+ }
+
if (s+2>e)
return MY_CS_TOOSMALL;
@@ -4454,12 +4460,18 @@ my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
if (s >= e)
return MY_CS_TOOFEW(0);
- if (hi<0x80)
+ if (hi < 0x80)
{
pwc[0]=hi;
return 1;
}
+ if (hi >= 0xA1 && hi <= 0xDF)
+ {
+ pwc[0]= func_sjis_uni_onechar(hi);
+ return 1;
+ }
+
if (s+2>e)
return MY_CS_TOOFEW(0);