diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-01-31 17:08:14 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-01-31 17:08:14 +0400 |
commit | f845e66b3f5615fcfc09db9bf62777b233a4b434 (patch) | |
tree | d7600d5601cd0f458ff39152714c428bd55349bc /strings | |
parent | 953e27208bb1c13addaa0caaaa15f8db28ef8d81 (diff) | |
download | mariadb-git-f845e66b3f5615fcfc09db9bf62777b233a4b434.tar.gz |
More use of new CHARSET_INFO functions and two bug fixes
sql/sql_string.cc:
More use of new CHARSET_INFO functions
strings/ctype-mb.c:
Bug fix
strings/ctype-utf8.c:
Bug fix
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-mb.c | 8 | ||||
-rw-r--r-- | strings/ctype-utf8.c | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index f5b7000cb18..aa4ccdb6af7 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -289,12 +289,10 @@ uint my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)), } uint my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused)), - uint pos) + const char *b, const char *e, uint pos) { - uint res=0, mblen; - const char *b0; + uint mblen; + const char *b0=b; while (pos && b<e) { diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 6eebcb022a5..e63405001f9 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -3079,7 +3079,7 @@ uint my_charpos_ucs2(CHARSET_INFO *cs __attribute__((unused)), const char *e __attribute__((unused)), uint pos) { - return pos/2; + return pos*2; } CHARSET_INFO my_charset_ucs2 = |