MySQL 8.0.39
Source Code Documentation
ctype-big5.cc File Reference
#include <stddef.h>
#include <sys/types.h>
#include <algorithm>
#include "m_ctype.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "my_macros.h"

Macros

#define isbig5head(c)   (0xa1 <= (uchar)(c) && (uchar)(c) <= 0xf9)
 
#define isbig5tail(c)
 
#define isbig5code(c, d)   (isbig5head(c) && isbig5tail(d))
 
#define big5code(c, d)   (((uchar)(c) << 8) | (uchar)(d))
 
#define big5head(e)   ((uchar)(e >> 8))
 
#define big5tail(e)   ((uchar)(e & 0xff))
 

Functions

static uint16 big5strokexfrm (uint16 i)
 
static int my_strnncoll_big5_internal (const uchar **a_res, const uchar **b_res, size_t length)
 
static int my_strnncoll_big5 (const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length, bool b_is_prefix)
 
static int my_strnncollsp_big5 (const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length)
 
static size_t my_strnxfrm_big5 (const CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
 
static uint ismbchar_big5 (const CHARSET_INFO *cs, const char *p, const char *e)
 
static uint mbcharlen_big5 (const CHARSET_INFO *cs, uint c)
 
static int func_big5_uni_onechar (int code)
 
static int func_uni_big5_onechar (int code)
 
static int my_wc_mb_big5 (const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
 
static int my_mb_wc_big5 (const CHARSET_INFO *cs, my_wc_t *pwc, const uchar *s, const uchar *e)
 
static size_t my_well_formed_len_big5 (const CHARSET_INFO *cs, const char *b, const char *e, size_t pos, int *error)
 

Variables

static const uchar ctype_big5 [257]
 
static const uchar to_lower_big5 []
 
static const uchar to_upper_big5 []
 
static const uchar sort_order_big5 []
 
static const MY_UNICASE_CHARACTER cA2 [256]
 
static const MY_UNICASE_CHARACTER cA3 [256]
 
static const MY_UNICASE_CHARACTER cC7 [256]
 
static const MY_UNICASE_CHARACTERmy_caseinfo_pages_big5 [256]
 
static MY_UNICASE_INFO my_caseinfo_big5 = {0xFFFF, my_caseinfo_pages_big5}
 
static const uint16 tab_big5_uni0 []
 
static const uint16 tab_big5_uni1 []
 
static const uint16 tab_uni_big50 []
 
static const uint16 tab_uni_big51 []
 
static const uint16 tab_uni_big52 []
 
static const uint16 tab_uni_big53 []
 
static const uint16 tab_uni_big54 []
 
static const uint16 tab_uni_big55 [] = {0xA1C0}
 
static const uint16 tab_uni_big56 []
 
static const uint16 tab_uni_big57 []
 
static const uint16 tab_uni_big58 []
 
static const uint16 tab_uni_big59 [] = {0xC94A, 0xDDFC}
 
static const uint16 tab_uni_big510 []
 
static MY_COLLATION_HANDLER my_collation_big5_chinese_ci_handler
 
static MY_CHARSET_HANDLER my_charset_big5_handler
 
CHARSET_INFO my_charset_big5_chinese_ci
 
CHARSET_INFO my_charset_big5_bin
 

Macro Definition Documentation

◆ big5code

#define big5code (   c,
 
)    (((uchar)(c) << 8) | (uchar)(d))

◆ big5head

#define big5head (   e)    ((uchar)(e >> 8))

◆ big5tail

#define big5tail (   e)    ((uchar)(e & 0xff))

◆ isbig5code

#define isbig5code (   c,
 
)    (isbig5head(c) && isbig5tail(d))

◆ isbig5head

#define isbig5head (   c)    (0xa1 <= (uchar)(c) && (uchar)(c) <= 0xf9)

◆ isbig5tail

#define isbig5tail (   c)
Value:
((0x40 <= (uchar)(c) && (uchar)(c) <= 0x7e) || \
(0xa1 <= (uchar)(c) && (uchar)(c) <= 0xfe))
unsigned char uchar
Definition: my_inttypes.h:52

Function Documentation

◆ big5strokexfrm()

static uint16 big5strokexfrm ( uint16  i)
static

◆ func_big5_uni_onechar()

static int func_big5_uni_onechar ( int  code)
static

◆ func_uni_big5_onechar()

static int func_uni_big5_onechar ( int  code)
static

◆ ismbchar_big5()

static uint ismbchar_big5 ( const CHARSET_INFO cs,
const char *  p,
const char *  e 
)
static

◆ mbcharlen_big5()

static uint mbcharlen_big5 ( const CHARSET_INFO cs,
uint  c 
)
static

◆ my_mb_wc_big5()

static int my_mb_wc_big5 ( const CHARSET_INFO cs,
my_wc_t pwc,
const uchar s,
const uchar e 
)
static

◆ my_strnncoll_big5()

static int my_strnncoll_big5 ( const CHARSET_INFO cs,
const uchar a,
size_t  a_length,
const uchar b,
size_t  b_length,
bool  b_is_prefix 
)
static

◆ my_strnncoll_big5_internal()

static int my_strnncoll_big5_internal ( const uchar **  a_res,
const uchar **  b_res,
size_t  length 
)
static

◆ my_strnncollsp_big5()

static int my_strnncollsp_big5 ( const CHARSET_INFO cs,
const uchar a,
size_t  a_length,
const uchar b,
size_t  b_length 
)
static

◆ my_strnxfrm_big5()

static size_t my_strnxfrm_big5 ( const CHARSET_INFO cs,
uchar dst,
size_t  dstlen,
uint  nweights,
const uchar src,
size_t  srclen,
uint  flags 
)
static

◆ my_wc_mb_big5()

static int my_wc_mb_big5 ( const CHARSET_INFO cs,
my_wc_t  wc,
uchar s,
uchar e 
)
static

◆ my_well_formed_len_big5()

static size_t my_well_formed_len_big5 ( const CHARSET_INFO cs,
const char *  b,
const char *  e,
size_t  pos,
int *  error 
)
static

Variable Documentation

◆ cA2

const MY_UNICASE_CHARACTER cA2[256]
static

◆ cA3

const MY_UNICASE_CHARACTER cA3[256]
static

◆ cC7

const MY_UNICASE_CHARACTER cC7[256]
static

◆ ctype_big5

const uchar ctype_big5[257]
static
Initial value:
= {
0,
32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 16, 16, 16, 16, 16, 16,
16, 129, 129, 129, 129, 129, 129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
16, 130, 130, 130, 130, 130, 130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0,
}

◆ my_caseinfo_big5

MY_UNICASE_INFO my_caseinfo_big5 = {0xFFFF, my_caseinfo_pages_big5}
static

◆ my_caseinfo_pages_big5

const MY_UNICASE_CHARACTER* my_caseinfo_pages_big5[256]
static

◆ my_charset_big5_bin

CHARSET_INFO my_charset_big5_bin

◆ my_charset_big5_chinese_ci

CHARSET_INFO my_charset_big5_chinese_ci

◆ my_charset_big5_handler

MY_CHARSET_HANDLER my_charset_big5_handler
static
Initial value:
= {nullptr,
static int my_mb_wc_big5(const CHARSET_INFO *cs, my_wc_t *pwc, const uchar *s, const uchar *e)
Definition: ctype-big5.cc:6446
static int my_wc_mb_big5(const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
Definition: ctype-big5.cc:6425
static uint mbcharlen_big5(const CHARSET_INFO *cs, uint c)
Definition: ctype-big5.cc:1291
static uint ismbchar_big5(const CHARSET_INFO *cs, const char *p, const char *e)
Definition: ctype-big5.cc:1286
static size_t my_well_formed_len_big5(const CHARSET_INFO *cs, const char *b, const char *e, size_t pos, int *error)
Definition: ctype-big5.cc:6468
size_t my_casedn_str_mb(const CHARSET_INFO *, char *)
Definition: ctype-mb.cc:61
size_t my_charpos_mb3(const CHARSET_INFO *, const char *b, const char *e, size_t pos)
Definition: ctype-mb.cc:331
double my_strntod_8bit(const CHARSET_INFO *, const char *s, size_t l, const char **e, int *err)
Definition: ctype-simple.cc:646
size_t my_snprintf_8bit(const CHARSET_INFO *, char *to, size_t n, const char *fmt,...)
Definition: ctype-simple.cc:281
ulonglong my_strntoull10rnd_8bit(const CHARSET_INFO *cs, const char *str, size_t length, int unsigned_fl, const char **endptr, int *error)
Definition: ctype-simple.cc:1235
ulong my_strntoul_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:397
size_t my_caseup_mb(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:88
void my_fill_8bit(const CHARSET_INFO *cs, char *to, size_t l, int fill)
Definition: ctype-simple.cc:907
size_t my_casedn_mb(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:115
size_t my_caseup_str_mb(const CHARSET_INFO *, char *)
Definition: ctype-mb.cc:44
size_t my_longlong10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l, int radix, longlong val)
Definition: ctype-simple.cc:695
size_t my_numchars_mb(const CHARSET_INFO *, const char *b, const char *e)
Definition: ctype-mb.cc:320
int my_mb_ctype_mb(const CHARSET_INFO *, int *, const uchar *, const uchar *)
Definition: ctype-mb.cc:1324
long my_strntol_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:318
size_t my_lengthsp_8bit(const CHARSET_INFO *cs, const char *ptr, size_t length)
Definition: ctype-simple.cc:936
longlong my_strtoll10_8bit(const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error)
Definition: ctype-simple.cc:1139
size_t my_numcells_8bit(const CHARSET_INFO *, const char *b, const char *e)
Definition: ctype-simple.cc:917
size_t my_long10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l, int radix, long int val)
Definition: ctype-simple.cc:659
ulonglong my_strntoull_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:549
size_t my_scan_8bit(const CHARSET_INFO *cs, const char *b, const char *e, int sq)
Definition: ctype-simple.cc:885
longlong my_strntoll_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:470

◆ my_collation_big5_chinese_ci_handler

MY_COLLATION_HANDLER my_collation_big5_chinese_ci_handler
static
Initial value:
= {
nullptr,
nullptr,
static int my_strnncoll_big5(const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length, bool b_is_prefix)
Definition: ctype-big5.cc:1224
static int my_strnncollsp_big5(const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length)
Definition: ctype-big5.cc:1234
static size_t my_strnxfrm_big5(const CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
Definition: ctype-big5.cc:1261
size_t my_strnxfrmlen_simple(const CHARSET_INFO *, size_t)
Definition: ctype-simple.cc:64
uint my_instr_mb(const CHARSET_INFO *, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch)
Definition: ctype-mb.cc:362
int my_wildcmp_mb(const CHARSET_INFO *, const char *str, const char *str_end, const char *wildstr, const char *wildend, int escape, int w_one, int w_many)
Definition: ctype-mb.cc:313
void my_hash_sort_simple(const CHARSET_INFO *cs, const uchar *key, size_t len, uint64 *nr1, uint64 *nr2)
Definition: ctype-simple.cc:291
int my_strcasecmp_mb(const CHARSET_INFO *cs, const char *, const char *)
Definition: ctype-mb.cc:197
bool my_like_range_mb(const CHARSET_INFO *cs, const char *ptr, size_t ptr_length, char escape, char w_one, char w_many, size_t res_length, char *min_str, char *max_str, size_t *min_length, size_t *max_length)
Definition: ctype-mb.cc:661
bool my_propagate_simple(const CHARSET_INFO *cs, const uchar *str, size_t len)
Definition: ctype-simple.cc:1484

◆ sort_order_big5

const uchar sort_order_big5[]
static

◆ tab_big5_uni0

const uint16 tab_big5_uni0[]
static

◆ tab_big5_uni1

const uint16 tab_big5_uni1[]
static

◆ tab_uni_big50

const uint16 tab_uni_big50[]
static
Initial value:
= {
0xA246, 0xA247, 0, 0xA244, 0, 0xA1B1, 0, 0, 0, 0, 0, 0, 0,
0, 0xA258, 0xA1D3, 0, 0, 0, 0, 0, 0xA150, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0xA1D1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0xA1D2}

◆ tab_uni_big51

const uint16 tab_uni_big51[]
static

◆ tab_uni_big510

const uint16 tab_uni_big510[]
static

◆ tab_uni_big52

const uint16 tab_uni_big52[]
static

◆ tab_uni_big53

const uint16 tab_uni_big53[]
static

◆ tab_uni_big54

const uint16 tab_uni_big54[]
static

◆ tab_uni_big55

const uint16 tab_uni_big55[] = {0xA1C0}
static

◆ tab_uni_big56

const uint16 tab_uni_big56[]
static
Initial value:
= {
0xA255, 0xA256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0xA250, 0xA251, 0xA252, 0, 0, 0xA254, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0xA257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xA253,
0, 0, 0xA1EB, 0xA1EA, 0, 0, 0xA24F}

◆ tab_uni_big57

const uint16 tab_uni_big57[]
static

◆ tab_uni_big58

const uint16 tab_uni_big58[]
static

◆ tab_uni_big59

const uint16 tab_uni_big59[] = {0xC94A, 0xDDFC}
static

◆ to_lower_big5

const uchar to_lower_big5[]
static

◆ to_upper_big5

const uchar to_upper_big5[]
static