diff options
Diffstat (limited to 'strings')
-rw-r--r-- | strings/Makefile.am | 6 | ||||
-rw-r--r-- | strings/ctype-big5.c | 12 | ||||
-rw-r--r-- | strings/ctype-czech.c | 19 | ||||
-rw-r--r-- | strings/ctype-gbk.c | 20 | ||||
-rw-r--r-- | strings/ctype-latin1_de.c | 25 | ||||
-rw-r--r-- | strings/ctype-mb.c | 125 | ||||
-rw-r--r-- | strings/ctype-simple.c | 87 | ||||
-rw-r--r-- | strings/ctype-sjis.c | 27 | ||||
-rw-r--r-- | strings/ctype-tis620.c | 11 | ||||
-rw-r--r-- | strings/ctype.c | 329 | ||||
-rw-r--r-- | strings/str2int.c | 2 | ||||
-rw-r--r-- | strings/strto.c | 12 |
12 files changed, 507 insertions, 168 deletions
diff --git a/strings/Makefile.am b/strings/Makefile.am index c1cfe64eb70..33d048a42d1 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -22,19 +22,19 @@ pkglib_LIBRARIES = libmystrings.a # Exact one of ASSEMBLER_X if ASSEMBLER_x86 ASRCS = strings-x86.s longlong2str-x86.s -CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c strnlen.c +CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c ctype-simple.c ctype-mb.c strnlen.c else if ASSEMBLER_sparc # These file MUST all be on the same line!! Otherwise automake # generats a very broken makefile ASRCS = bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s strxmov-sparc.s -CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c strnlen.c +CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c ctype-simple.c ctype-mb.c strnlen.c else #no assembler ASRCS = # These file MUST all be on the same line!! Otherwise automake # generats a very broken makefile -CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c strnlen.c +CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c ctype-simple.c ctype-mb.c strnlen.c endif endif diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 44f8a100897..2155f3e72c9 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -213,7 +213,9 @@ static uint16 big5strokexfrm(uint16 i) return 0xA140; } -int my_strnncoll_big5(const uchar * s1, int len1, const uchar * s2, int len2) +int my_strnncoll_big5(CHARSET_INFO *cs, + const uchar * s1, uint len1, + const uchar * s2, uint len2) { uint len; @@ -235,10 +237,11 @@ int my_strnncoll_big5(const uchar * s1, int len1, const uchar * s2, int len2) return (int) (len1-len2); } -int my_strnxfrm_big5(uchar * dest, const uchar * src, int len, int srclen) +int my_strnxfrm_big5(CHARSET_INFO *cs, + uchar * dest, uint len, + const uchar * src, uint srclen) { uint16 e; - /*uchar *d = dest; XXX: unused*/ len = srclen; while (len--) @@ -323,7 +326,8 @@ int my_strxfrm_big5(uchar * dest, const uchar * src, int len) #define wild_one '_' #define wild_many '%' -my_bool my_like_range_big5(const char *ptr,uint ptr_length,pchar escape, +my_bool my_like_range_big5(CHARSET_INFO *cs, + const char *ptr,uint ptr_length,pchar escape, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 4564ca2361b..7db37c0b5d9 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -280,7 +280,9 @@ int my_strxfrm_czech(uchar * dest, const uchar * src, int len) /* Function strnncoll, actually strcoll, with Czech sorting, which expect the length of the strings being specified */ -int my_strnncoll_czech(const uchar * s1, int len1, const uchar * s2, int len2) +int my_strnncoll_czech(CHARSET_INFO *cs, + const uchar * s1, uint len1, + const uchar * s2, uint len2) { int v1, v2; const uchar * p1, * p2, * store1, * store2; @@ -292,8 +294,8 @@ int my_strnncoll_czech(const uchar * s1, int len1, const uchar * s2, int len2) do { - NEXT_CMP_VALUE(s1, p1, store1, pass1, v1, len1); - NEXT_CMP_VALUE(s2, p2, store2, pass2, v2, len2); + NEXT_CMP_VALUE(s1, p1, store1, pass1, v1, (int)len1); + NEXT_CMP_VALUE(s2, p2, store2, pass2, v2, (int)len2); diff = v1 - v2; if (diff != 0) return diff; @@ -304,7 +306,9 @@ int my_strnncoll_czech(const uchar * s1, int len1, const uchar * s2, int len2) /* Function strnxfrm, actually strxfrm, with Czech sorting, which expect the length of the strings being specified */ -int my_strnxfrm_czech(uchar * dest, const uchar * src, int len, int srclen) +int my_strnxfrm_czech(CHARSET_INFO *cs, + uchar * dest, uint len, + const uchar * src, uint srclen) { int value; const uchar * p, * store; @@ -314,8 +318,8 @@ int my_strnxfrm_czech(uchar * dest, const uchar * src, int len, int srclen) do { - NEXT_CMP_VALUE(src, p, store, pass, value, srclen); - ADD_TO_RESULT(dest, len, totlen, value); + NEXT_CMP_VALUE(src, p, store, pass, value, (int)srclen); + ADD_TO_RESULT(dest, (int)len, totlen, value); } while (value); return totlen; @@ -372,7 +376,8 @@ int my_strnxfrm_czech(uchar * dest, const uchar * src, int len, int srclen) #define EXAMPLE -my_bool my_like_range_czech(const char *ptr,uint ptr_length,pchar escape, +my_bool my_like_range_czech(CHARSET_INFO *cs, + const char *ptr,uint ptr_length,pchar escape, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index 9fccce175d8..3ef37d2f6bb 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -2579,7 +2579,9 @@ static uint16 gbksortorder(uint16 i) } -int my_strnncoll_gbk(const uchar * s1, int len1, const uchar * s2, int len2) +int my_strnncoll_gbk(CHARSET_INFO *cs, + const uchar * s1, uint len1, + const uchar * s2, uint len2) { uint len,c1,c2; @@ -2603,13 +2605,10 @@ int my_strnncoll_gbk(const uchar * s1, int len1, const uchar * s2, int len2) return (int) (len1-len2); } -int my_strcoll_gbk(const uchar * s1, const uchar * s2) -{ - return my_strnncoll_gbk(s1, (uint) strlen((char*) s1), - s2, (uint) strlen((char*) s2)); -} -int my_strnxfrm_gbk(uchar * dest, const uchar * src, int len, int srclen) +int my_strnxfrm_gbk(CHARSET_INFO *cs, + uchar * dest, uint len, + const uchar * src, uint srclen) { uint16 e; @@ -2629,10 +2628,6 @@ int my_strnxfrm_gbk(uchar * dest, const uchar * src, int len, int srclen) return srclen; } -int my_strxfrm_gbk(uchar * dest, const uchar * src, int len) -{ - return my_strnxfrm_gbk(dest,src,len,(uint) strlen((char*) src)); -} /* ** Calculate min_str and max_str that ranges a LIKE string. @@ -2655,7 +2650,8 @@ int my_strxfrm_gbk(uchar * dest, const uchar * src, int len) #define wild_one '_' #define wild_many '%' -extern my_bool my_like_range_gbk(const char *ptr,uint ptr_length,pchar escape, +extern my_bool my_like_range_gbk(CHARSET_INFO *cs, + const char *ptr,uint ptr_length,pchar escape, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index 86b667b8f40..961112a65b4 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -162,8 +162,9 @@ uchar sort_order_latin1_de[] = { } -int my_strnncoll_latin1_de(const uchar * s1, int len1, - const uchar * s2, int len2) +int my_strnncoll_latin1_de(CHARSET_INFO *cs, + const uchar * s1, uint len1, + const uchar * s2, uint len2) { const uchar *e1 = s1 + len1; const uchar *e2 = s2 + len2; @@ -235,7 +236,9 @@ int my_strnncoll_latin1_de(const uchar * s1, int len1, } -int my_strnxfrm_latin1_de(uchar * dest, const uchar * src, int len, int srclen) +int my_strnxfrm_latin1_de(CHARSET_INFO *cs, + uchar * dest, uint len, + const uchar * src, uint srclen) { const uchar *dest_orig = dest; const uchar *de = dest + len; @@ -274,19 +277,6 @@ int my_strnxfrm_latin1_de(uchar * dest, const uchar * src, int len, int srclen) } -int my_strcoll_latin1_de(const uchar * s1, const uchar * s2) -{ - /* XXX QQ: This should be fixed to not call strlen */ - return my_strnncoll_latin1_de(s1, strlen((char*) s1), - s2, strlen((char*) s2)); -} - -int my_strxfrm_latin1_de(uchar * dest, const uchar * src, int len) -{ - /* XXX QQ: This should be fixed to not call strlen */ - return my_strnxfrm_latin1_de(dest, src, len, strlen((char*) src)); -} - /* * Calculate min_str and max_str that ranges a LIKE string. * Arguments: @@ -311,7 +301,8 @@ int my_strxfrm_latin1_de(uchar * dest, const uchar * src, int len) #define wild_one '_' #define wild_many '%' -my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length, +my_bool my_like_range_latin1_de(CHARSET_INFO *cs, + const char *ptr, uint ptr_length, pchar escape, uint res_length, char *min_str, char *max_str, uint *min_length, uint *max_length) diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c new file mode 100644 index 00000000000..97de219429c --- /dev/null +++ b/strings/ctype-mb.c @@ -0,0 +1,125 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <my_global.h> +#include "m_ctype.h" + +void my_caseup_str_mb(CHARSET_INFO * cs, char *str) +{ + register uint32 l; + register char *end=str+strlen(str); /* BAR TODO: remove strlen() call */ + while (*str) + { + if ((l=my_ismbchar(cs, str,end))) + str+=l; + else + { + *str=(char)my_toupper(cs,(uchar)*str); + str++; + } + } +} + +void my_casedn_str_mb(CHARSET_INFO * cs, char *str) +{ + register uint32 l; + register char *end=str+strlen(str); + while (*str) + { + if ((l=my_ismbchar(cs, str,end))) + str+=l; + else + { + *str=(char)my_tolower(cs,(uchar)*str); + str++; + } + } +} + +void my_caseup_mb(CHARSET_INFO * cs, char *str, uint length) +{ + register uint32 l; + register char *end=str+length; + while (str<end) + { + if ((l=my_ismbchar(cs, str,end))) + str+=l; + else + { + *str=(char)my_toupper(cs,(uchar)*str); + str++; + } + } +} + +void my_casedn_mb(CHARSET_INFO * cs, char *str, uint length) +{ + register uint32 l; + register char *end=str+length; + while (str<end) + { + if ((l=my_ismbchar(cs, str,end))) + str+=l; + else + { + *str=(char)my_tolower(cs,(uchar)*str); + str++; + } + } +} + +int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t) +{ + register uint32 l; + register const char *end=s+strlen(s); + while (s<end) + { + if ((l=my_ismbchar(cs, s,end))) + { + while (l--) + if (*s++ != *t++) + return 1; + } + else if (my_ismbhead(cs, *t)) + return 1; + else if (my_toupper(cs,(uchar) *s++) != my_toupper(cs,(uchar) *t++)) + return 1; + } + return *t; +} + + +int my_strncasecmp_mb(CHARSET_INFO * cs, + const char *s, const char *t, uint len) +{ + register uint32 l; + register const char *end=s+len; + while (s<end) + { + if ((l=my_ismbchar(cs, s,end))) + { + while (l--) + if (*s++ != *t++) + return 1; + } + else if (my_ismbhead(cs, *t)) + return 1; + else if (my_toupper(cs,(uchar) *s++) != my_toupper(cs,(uchar) *t++)) + return 1; + } + return 0; +} + diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c new file mode 100644 index 00000000000..5473a15e4fe --- /dev/null +++ b/strings/ctype-simple.c @@ -0,0 +1,87 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <my_global.h> +#include "m_ctype.h" +#include "dbug.h" +#include "assert.h" + +int my_strnxfrm_simple(CHARSET_INFO * cs, + char *dest, uint len, + const char *src, uint srclen) +{ + DBUG_ASSERT(len >= srclen); + + for ( ; len > 0 ; len-- ) + *dest++= (char) cs->sort_order[(uchar) *src++]; + return srclen; +} + +int my_strnncoll_simple(CHARSET_INFO * cs,const char *s, uint slen, + const char *t, uint tlen) +{ + int len = ( slen > tlen ) ? tlen : slen; + while (len--) + { + if (cs->sort_order[(uchar) *s++] != cs->sort_order[(uchar) *t++]) + return ((int) cs->sort_order[(uchar) s[-1]] - + (int) cs->sort_order[(uchar) t[-1]]); + } + return (int) (slen-tlen); +} + + +void my_caseup_str_8bit(CHARSET_INFO * cs,char *str) +{ + while ((*str = (char) my_toupper(cs,(uchar) *str)) != 0) + str++; +} + + +void my_casedn_str_8bit(CHARSET_INFO * cs,char *str) +{ + while ((*str = (char) my_tolower(cs,(uchar)*str)) != 0) + str++; +} + + +void my_caseup_8bit(CHARSET_INFO * cs, char *str, uint length) +{ + for ( ; length>0 ; length--, str++) + *str= (char) my_toupper(cs,(uchar)*str); +} + +void my_casedn_8bit(CHARSET_INFO * cs, char *str, uint length) +{ + for ( ; length>0 ; length--, str++) + *str= (char)my_tolower(cs,(uchar) *str); +} + + +int my_strcasecmp_8bit(CHARSET_INFO * cs,const char *s, const char *t) +{ + while (my_toupper(cs,(uchar) *s) == my_toupper(cs,(uchar) *t++)) + if (!*s++) return 0; + return ((int) my_toupper(cs,(uchar) s[0]) - (int) my_toupper(cs,(uchar) t[-1])); +} + + +int my_strncasecmp_8bit(CHARSET_INFO * cs, + const char *s, const char *t, uint len) +{ + while (len-- != 0 && my_toupper(cs,(uchar)*s++) == my_toupper(cs,(uchar)*t++)) ; + return (int) len+1; +} diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 5d5f64cc5fe..f3c5d8a2920 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -198,7 +198,9 @@ int mbcharlen_sjis(uint c) #define sjiscode(c,d) ((((uint) (uchar)(c)) << 8) | (uint) (uchar) (d)) -int my_strnncoll_sjis(const uchar *s1, int len1, const uchar *s2, int len2) +int my_strnncoll_sjis(CHARSET_INFO *cs, + const uchar *s1, uint len1, + const uchar *s2, uint len2) { const uchar *e1 = s1 + len1; const uchar *e2 = s2 + len2; @@ -221,13 +223,9 @@ int my_strnncoll_sjis(const uchar *s1, int len1, const uchar *s2, int len2) return len1 - len2; } -int my_strcoll_sjis(const uchar *s1, const uchar *s2) -{ - return (uint) my_strnncoll_sjis(s1,(uint) strlen((char*) s1), - s2,(uint) strlen((char*) s2)); -} - -int my_strnxfrm_sjis(uchar *dest, const uchar *src, int len, int srclen) +int my_strnxfrm_sjis(CHARSET_INFO *cs, + uchar *dest, uint len, + const uchar *src, uint srclen) { uchar *d_end = dest + len; uchar *s_end = (uchar*) src + srclen; @@ -243,12 +241,6 @@ int my_strnxfrm_sjis(uchar *dest, const uchar *src, int len, int srclen) return srclen; } -int my_strxfrm_sjis(uchar *dest, const uchar *src, int len) -{ - return my_strnxfrm_sjis(dest, src, len, (uint) strlen((char*) src)); -} - - /* ** Calculate min_str and max_str that ranges a LIKE string. ** Arguments: @@ -270,9 +262,10 @@ int my_strxfrm_sjis(uchar *dest, const uchar *src, int len) #define wild_one '_' #define wild_many '%' -my_bool my_like_range_sjis(const char *ptr,uint ptr_length,pchar escape, - uint res_length, char *min_str,char *max_str, - uint *min_length,uint *max_length) +my_bool my_like_range_sjis(CHARSET_INFO *cs, + const char *ptr,uint ptr_length,pchar escape, + uint res_length, char *min_str,char *max_str, + uint *min_length,uint *max_length) { const char *end=ptr+ptr_length; char *min_org=min_str; diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 370c4c773c6..134ab527ecc 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -535,7 +535,9 @@ static uchar* thai2sortable(const uchar * tstr,uint len) Arg: 2 Strings and it compare length Ret: strcmp result */ -int my_strnncoll_tis620(const uchar * s1, int len1, const uchar * s2, int len2) +int my_strnncoll_tis620(CHARSET_INFO *cs, + const uchar * s1, uint len1, + const uchar * s2, uint len2) { uchar *tc1, *tc2; int i; @@ -551,7 +553,9 @@ int my_strnncoll_tis620(const uchar * s1, int len1, const uchar * s2, int len2) Arg: Destination buffer, source string, dest length and source length Ret: Conveted string size */ -int my_strnxfrm_tis620(uchar * dest, const uchar * src, int len, int srclen) +int my_strnxfrm_tis620(CHARSET_INFO *cs, + uchar * dest, uint len, + const uchar * src, uint srclen) { uint bufSize; uchar *tmp; @@ -607,7 +611,8 @@ int my_strxfrm_tis620(uchar * dest, const uchar * src, int len) #define wild_one '_' #define wild_many '%' -my_bool my_like_range_tis620(const char *ptr, uint ptr_length, pchar escape, +my_bool my_like_range_tis620(CHARSET_INFO *cs, + const char *ptr, uint ptr_length, pchar escape, uint res_length, char *min_str, char *max_str, uint *min_length, uint *max_length) { diff --git a/strings/ctype.c b/strings/ctype.c index ab17a16bb54..5e2bb38d4fd 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -1967,8 +1967,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_latin1, sort_order_latin1, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -1976,7 +1974,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -1989,8 +1993,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_big5, sort_order_big5, 1, /* strxfrm_multiply */ - my_strcoll_big5, - my_strxfrm_big5, my_strnncoll_big5, my_strnxfrm_big5, my_like_range_big5, @@ -1998,7 +2000,13 @@ CHARSET_INFO compiled_charsets[] = { ismbchar_big5, ismbhead_big5, mbcharlen_big5, - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_mb, + my_casedn_str_mb, + my_caseup_mb, + my_casedn_mb, + my_strcasecmp_mb, + my_strncasecmp_mb, + 0 }, #endif @@ -2011,8 +2019,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_cp1251, sort_order_cp1251, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2020,7 +2026,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2033,8 +2045,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_cp1257, sort_order_cp1257, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2042,7 +2052,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2055,8 +2071,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_croat, sort_order_croat, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2064,7 +2078,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2077,8 +2097,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_czech, sort_order_czech, 4, /* strxfrm_multiply */ - my_strcoll_czech, - my_strxfrm_czech, my_strnncoll_czech, my_strnxfrm_czech, my_like_range_czech, @@ -2086,7 +2104,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2099,8 +2123,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_danish, sort_order_danish, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2108,7 +2130,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2121,8 +2149,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_dec8, sort_order_dec8, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2130,7 +2156,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2143,8 +2175,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_dos, sort_order_dos, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2152,7 +2182,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2165,8 +2201,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_estonia, sort_order_estonia, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2174,7 +2208,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2187,8 +2227,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_euc_kr, sort_order_euc_kr, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2196,7 +2234,13 @@ CHARSET_INFO compiled_charsets[] = { ismbchar_euc_kr, ismbhead_euc_kr, mbcharlen_euc_kr, - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_mb, + my_casedn_str_mb, + my_caseup_mb, + my_casedn_mb, + my_strcasecmp_mb, + my_strncasecmp_mb, + 0 }, #endif @@ -2209,8 +2253,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_gb2312, sort_order_gb2312, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2218,7 +2260,13 @@ CHARSET_INFO compiled_charsets[] = { ismbchar_gb2312, ismbhead_gb2312, mbcharlen_gb2312, - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_mb, + my_casedn_str_mb, + my_caseup_mb, + my_casedn_mb, + my_strcasecmp_mb, + my_strncasecmp_mb, + 0 }, #endif @@ -2231,8 +2279,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_gbk, sort_order_gbk, 1, /* strxfrm_multiply */ - my_strcoll_gbk, - my_strxfrm_gbk, my_strnncoll_gbk, my_strnxfrm_gbk, my_like_range_gbk, @@ -2240,7 +2286,13 @@ CHARSET_INFO compiled_charsets[] = { ismbchar_gbk, ismbhead_gbk, mbcharlen_gbk, - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_mb, + my_casedn_str_mb, + my_caseup_mb, + my_casedn_mb, + my_strcasecmp_mb, + my_strncasecmp_mb, + 0 }, #endif @@ -2253,8 +2305,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_german1, sort_order_german1, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2262,7 +2312,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2275,8 +2331,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_greek, sort_order_greek, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2284,7 +2338,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2297,8 +2357,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_hebrew, sort_order_hebrew, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2306,7 +2364,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2319,8 +2383,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_hp8, sort_order_hp8, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2328,7 +2390,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2341,8 +2409,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_hungarian, sort_order_hungarian, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2350,7 +2416,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2363,8 +2435,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_koi8_ru, sort_order_koi8_ru, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2372,7 +2442,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2385,8 +2461,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_koi8_ukr, sort_order_koi8_ukr, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2394,7 +2468,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2407,8 +2487,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_latin1_de, sort_order_latin1_de, 2, /* strxfrm_multiply */ - my_strcoll_latin1_de, - my_strxfrm_latin1_de, my_strnncoll_latin1_de, my_strnxfrm_latin1_de, my_like_range_latin1_de, @@ -2416,7 +2494,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2429,8 +2513,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_latin2, sort_order_latin2, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2438,7 +2520,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2451,8 +2539,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_latin5, sort_order_latin5, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2460,7 +2546,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2473,8 +2565,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_sjis, sort_order_sjis, 1, /* strxfrm_multiply */ - my_strcoll_sjis, - my_strxfrm_sjis, my_strnncoll_sjis, my_strnxfrm_sjis, my_like_range_sjis, @@ -2482,7 +2572,13 @@ CHARSET_INFO compiled_charsets[] = { ismbchar_sjis, ismbhead_sjis, mbcharlen_sjis, - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2495,8 +2591,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_swe7, sort_order_swe7, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2504,7 +2598,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2517,8 +2617,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_tis620, sort_order_tis620, 4, /* strxfrm_multiply */ - my_strcoll_tis620, - my_strxfrm_tis620, my_strnncoll_tis620, my_strnxfrm_tis620, my_like_range_tis620, @@ -2526,7 +2624,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2539,8 +2643,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_ujis, sort_order_ujis, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2548,7 +2650,13 @@ CHARSET_INFO compiled_charsets[] = { ismbchar_ujis, ismbhead_ujis, mbcharlen_ujis, - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_mb, + my_casedn_str_mb, + my_caseup_mb, + my_casedn_mb, + my_strcasecmp_mb, + my_strncasecmp_mb, + 0 }, #endif @@ -2561,8 +2669,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_usa7, sort_order_usa7, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2570,7 +2676,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2583,8 +2695,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_win1250, sort_order_win1250, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2592,7 +2702,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2605,8 +2721,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_win1251ukr, sort_order_win1251ukr, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2614,7 +2728,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2627,8 +2747,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_armscii8, sort_order_armscii8, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2636,7 +2754,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2649,8 +2773,6 @@ CHARSET_INFO compiled_charsets[] = { to_upper_win1251, sort_order_win1251, 0, /* strxfrm_multiply */ - NULL, /* strcoll */ - NULL, /* strxfrm */ NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ @@ -2658,7 +2780,13 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - NULL,NULL,NULL,NULL,NULL,NULL + my_caseup_str_8bit, + my_casedn_str_8bit, + my_caseup_8bit, + my_casedn_8bit, + my_strcasecmp_8bit, + my_strncasecmp_8bit, + 0 }, #endif @@ -2673,18 +2801,23 @@ CHARSET_INFO compiled_charsets[] = { NULL, NULL, NULL, + 0, + NULL, + NULL, + NULL, + NULL, NULL, NULL, - 0, NULL, NULL, NULL, - NULL,NULL,NULL,NULL,NULL,NULL + 0 } }; CHARSET_INFO *default_charset_info = &compiled_charsets[0]; +CHARSET_INFO *system_charset_info = &compiled_charsets[0]; CHARSET_INFO *find_compiled_charset(uint cs_number) { diff --git a/strings/str2int.c b/strings/str2int.c index 58669287473..d7e6bb9aabc 100644 --- a/strings/str2int.c +++ b/strings/str2int.c @@ -98,7 +98,7 @@ char *str2int(register const char *src, register int radix, long int lower, converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ - while (isspace(*src)) src++; + while (my_isspace(system_charset_info,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; diff --git a/strings/strto.c b/strings/strto.c index 84dccbcbeb8..9af101296a3 100644 --- a/strings/strto.c +++ b/strings/strto.c @@ -95,7 +95,7 @@ function (const char *nptr,char **endptr,int base) s = nptr; /* Skip white space. */ - while (isspace (*s)) + while (my_isspace (system_charset_info, *s)) ++s; if (*s == '\0') { @@ -116,7 +116,7 @@ function (const char *nptr,char **endptr,int base) else negative = 0; - if (base == 16 && s[0] == '0' && toupper (s[1]) == 'X') + if (base == 16 && s[0] == '0' && my_toupper (system_charset_info, s[1]) == 'X') s += 2; /* If BASE is zero, figure it out ourselves. */ @@ -124,7 +124,7 @@ function (const char *nptr,char **endptr,int base) { if (*s == '0') { - if (toupper (s[1]) == 'X') + if (my_toupper (system_charset_into, s[1]) == 'X') { s += 2; base = 16; @@ -146,10 +146,10 @@ function (const char *nptr,char **endptr,int base) i = 0; for (c = *s; c != '\0'; c = *++s) { - if (isdigit (c)) + if (my_isdigit (system_charset_info, c)) c -= '0'; - else if (isalpha (c)) - c = toupper (c) - 'A' + 10; + else if (my_isalpha (system_charset_info, c)) + c = my_toupper (system_charset_into, c) - 'A' + 10; else break; if (c >= base) |