diff options
author | serg@serg.mylan <> | 2003-12-06 19:05:26 +0100 |
---|---|---|
committer | serg@serg.mylan <> | 2003-12-06 19:05:26 +0100 |
commit | b2e6b36487d6c0e1660263e50f7ad1d15b6ef02a (patch) | |
tree | f9c88e2f87875a8d63da6a70bd2a56b9dca57fe4 /strings | |
parent | cbcb863ca5475cf0fcce4fd1f6fe59dfac1f9daf (diff) | |
download | mariadb-git-b2e6b36487d6c0e1660263e50f7ad1d15b6ef02a.tar.gz |
fix for my_mbcharlen(charset, c) to return 1 for single-byte characters
(isn't it obvious ?)
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-big5.c | 2 | ||||
-rw-r--r-- | strings/ctype-euc_kr.c | 2 | ||||
-rw-r--r-- | strings/ctype-gb2312.c | 2 | ||||
-rw-r--r-- | strings/ctype-gbk.c | 2 | ||||
-rw-r--r-- | strings/ctype-sjis.c | 2 | ||||
-rw-r--r-- | strings/ctype-ujis.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 878493bc31f..b7a87e21f0f 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -401,7 +401,7 @@ static int ismbchar_big5(CHARSET_INFO *cs __attribute__((unused)), static int mbcharlen_big5(CHARSET_INFO *cs __attribute__((unused)), uint c) { - return (isbig5head(c)? 2: 0); + return (isbig5head(c)? 2 : 1); } /* page 0 0xA140-0xC7FC */ diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index d47c4268642..ace0c4aef5d 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -193,7 +193,7 @@ static int ismbchar_euc_kr(CHARSET_INFO *cs __attribute__((unused)), static int mbcharlen_euc_kr(CHARSET_INFO *cs __attribute__((unused)),uint c) { - return (iseuc_kr(c) ? 2 : 0); + return (iseuc_kr(c) ? 2 : 1); } diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index d429fa34eea..248755785f1 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -174,7 +174,7 @@ static int ismbchar_gb2312(CHARSET_INFO *cs __attribute__((unused)), static int mbcharlen_gb2312(CHARSET_INFO *cs __attribute__((unused)),uint c) { - return (isgb2312head(c)? 2:0); + return (isgb2312head(c)? 2 : 1); } diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index fa7aa175103..3b2f5b784ed 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -2721,7 +2721,7 @@ static int ismbchar_gbk(CHARSET_INFO *cs __attribute__((unused)), static int mbcharlen_gbk(CHARSET_INFO *cs __attribute__((unused)),uint c) { - return (isgbkhead(c)? 2:0); + return (isgbkhead(c)? 2 : 1); } /* page 0 0x8140-0xFE4F */ diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index f302e678b9f..d1cabbd72d6 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -191,7 +191,7 @@ static int ismbchar_sjis(CHARSET_INFO *cs __attribute__((unused)), static int mbcharlen_sjis(CHARSET_INFO *cs __attribute__((unused)),uint c) { - return (issjishead((uchar) c) ? 2: 0); + return (issjishead((uchar) c) ? 2 : 1); } diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 29375aca727..484ee605273 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -196,7 +196,7 @@ static int ismbchar_ujis(CHARSET_INFO *cs __attribute__((unused)), static int mbcharlen_ujis(CHARSET_INFO *cs __attribute__((unused)),uint c) { - return (isujis(c)? 2: isujis_ss2(c)? 2: isujis_ss3(c)? 3: 0); + return (isujis(c)? 2: isujis_ss2(c)? 2: isujis_ss3(c)? 3: 1); } |