MySQL 8.4.2
Source Code Documentation
ctype-big5.cc File Reference
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include "my_compiler.h"
#include "mysql/strings/m_ctype.h"
#include "strings/m_ctype_internals.h"

Macros

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

Functions

static uint16_t big5strokexfrm (uint16_t i)
 
static int my_strnncoll_big5_internal (const uint8_t **a_res, const uint8_t **b_res, size_t length)
 
static int my_strnncoll_big5 (const CHARSET_INFO *cs, const uint8_t *a, size_t a_length, const uint8_t *b, size_t b_length, bool b_is_prefix)
 
static int my_strnncollsp_big5 (const CHARSET_INFO *cs, const uint8_t *a, size_t a_length, const uint8_t *b, size_t b_length)
 
static size_t my_strnxfrm_big5 (const CHARSET_INFO *cs, uint8_t *dst, size_t dstlen, unsigned nweights, const uint8_t *src, size_t srclen, unsigned flags)
 
static unsigned ismbchar_big5 (const CHARSET_INFO *cs, const char *p, const char *e)
 
static unsigned mbcharlen_big5 (const CHARSET_INFO *cs, unsigned 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, uint8_t *s, uint8_t *e)
 
static int my_mb_wc_big5 (const CHARSET_INFO *cs, my_wc_t *pwc, const uint8_t *s, const uint8_t *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 uint8_t ctype_big5 [257]
 
static const uint8_t to_lower_big5 []
 
static const uint8_t to_upper_big5 []
 
static const uint8_t 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_t tab_big5_uni0 []
 
static const uint16_t tab_big5_uni1 []
 
static const uint16_t tab_uni_big50 []
 
static const uint16_t tab_uni_big51 []
 
static const uint16_t tab_uni_big52 []
 
static const uint16_t tab_uni_big53 []
 
static const uint16_t tab_uni_big54 []
 
static const uint16_t tab_uni_big55 [] = {0xA1C0}
 
static const uint16_t tab_uni_big56 []
 
static const uint16_t tab_uni_big57 []
 
static const uint16_t tab_uni_big58 []
 
static const uint16_t tab_uni_big59 [] = {0xC94A, 0xDDFC}
 
static const uint16_t 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,
 
)    (((uint8_t)(c) << 8) | (uint8_t)(d))

◆ big5head

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

◆ big5tail

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

◆ isbig5code

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

◆ isbig5head

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

◆ isbig5tail

#define isbig5tail (   c)
Value:
((0x40 <= (uint8_t)(c) && (uint8_t)(c) <= 0x7e) || \
(0xa1 <= (uint8_t)(c) && (uint8_t)(c) <= 0xfe))

Function Documentation

◆ big5strokexfrm()

static uint16_t big5strokexfrm ( uint16_t  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 unsigned ismbchar_big5 ( const CHARSET_INFO cs,
const char *  p,
const char *  e 
)
static

◆ mbcharlen_big5()

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

◆ my_mb_wc_big5()

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

◆ my_strnncoll_big5()

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

◆ my_strnncoll_big5_internal()

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

◆ my_strnncollsp_big5()

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

◆ my_strnxfrm_big5()

static size_t my_strnxfrm_big5 ( const CHARSET_INFO cs,
uint8_t *  dst,
size_t  dstlen,
unsigned  nweights,
const uint8_t *  src,
size_t  srclen,
unsigned  flags 
)
static

◆ my_wc_mb_big5()

static int my_wc_mb_big5 ( const CHARSET_INFO cs,
my_wc_t  wc,
uint8_t *  s,
uint8_t *  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 uint8_t 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 unsigned ismbchar_big5(const CHARSET_INFO *cs, const char *p, const char *e)
Definition: ctype-big5.cc:1292
static int my_mb_wc_big5(const CHARSET_INFO *cs, my_wc_t *pwc, const uint8_t *s, const uint8_t *e)
Definition: ctype-big5.cc:6453
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:6475
static unsigned mbcharlen_big5(const CHARSET_INFO *cs, unsigned c)
Definition: ctype-big5.cc:1297
static int my_wc_mb_big5(const CHARSET_INFO *cs, my_wc_t wc, uint8_t *s, uint8_t *e)
Definition: ctype-big5.cc:6432
int my_mb_ctype_mb(const CHARSET_INFO *cs, int *ctype, const uint8_t *s, const uint8_t *e)
Definition: ctype-mb.cc:1322
size_t my_numchars_mb(const CHARSET_INFO *cs, const char *pos, const char *end)
Definition: ctype-mb.cc:315
size_t my_casedn_mb(const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:112
size_t my_casedn_str_mb(const CHARSET_INFO *cs, char *str)
Definition: ctype-mb.cc:58
size_t my_caseup_mb(const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:85
size_t my_charpos_mb3(const CHARSET_INFO *cs, const char *pos, const char *end, size_t length)
Definition: ctype-mb.cc:326
size_t my_caseup_str_mb(const CHARSET_INFO *cs, char *str)
Definition: ctype-mb.cc:41
size_t my_numcells_8bit(const CHARSET_INFO *cs, const char *b, const char *e)
Definition: ctype-simple.cc:908
long long my_strtoll10_8bit(const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error)
Definition: ctype-simple.cc:1125
unsigned long long my_strntoull10rnd_8bit(const CHARSET_INFO *cs, const char *str, size_t length, int unsigned_flag, const char **endptr, int *error)
Definition: ctype-simple.cc:1221
double my_strntod_8bit(const CHARSET_INFO *cs, const char *str, size_t length, const char **end, int *err)
Definition: ctype-simple.cc:636
long long my_strntoll_8bit(const CHARSET_INFO *cs, const char *nptr, size_t l, int base, const char **endptr, int *err)
Definition: ctype-simple.cc:461
size_t my_longlong10_to_str_8bit(const CHARSET_INFO *cs, char *dst, size_t len, int radix, long long val)
Definition: ctype-simple.cc:686
size_t my_long10_to_str_8bit(const CHARSET_INFO *cs, char *dst, size_t len, int radix, long int val)
Definition: ctype-simple.cc:650
size_t my_lengthsp_8bit(const CHARSET_INFO *cs, const char *ptr, size_t length)
Definition: ctype-simple.cc:927
unsigned long long my_strntoull_8bit(const CHARSET_INFO *cs, const char *nptr, size_t l, int base, const char **endptr, int *err)
Definition: ctype-simple.cc:539
size_t my_snprintf_8bit(const CHARSET_INFO *cs, char *to, size_t n, const char *fmt,...)
Definition: ctype-simple.cc:278
void my_fill_8bit(const CHARSET_INFO *cs, char *s, size_t l, int fill)
Definition: ctype-simple.cc:898
unsigned long my_strntoul_8bit(const CHARSET_INFO *cs, const char *nptr, size_t l, int base, const char **endptr, int *err)
Definition: ctype-simple.cc:389
long my_strntol_8bit(const CHARSET_INFO *cs, const char *nptr, size_t l, int base, const char **endptr, int *err)
Definition: ctype-simple.cc:311
size_t my_scan_8bit(const CHARSET_INFO *cs, const char *str, const char *end, int sq)
Definition: ctype-simple.cc:876

◆ my_collation_big5_chinese_ci_handler

MY_COLLATION_HANDLER my_collation_big5_chinese_ci_handler
static
Initial value:
= {
nullptr,
nullptr,
static int my_strnncollsp_big5(const CHARSET_INFO *cs, const uint8_t *a, size_t a_length, const uint8_t *b, size_t b_length)
Definition: ctype-big5.cc:1240
static int my_strnncoll_big5(const CHARSET_INFO *cs, const uint8_t *a, size_t a_length, const uint8_t *b, size_t b_length, bool b_is_prefix)
Definition: ctype-big5.cc:1229
static size_t my_strnxfrm_big5(const CHARSET_INFO *cs, uint8_t *dst, size_t dstlen, unsigned nweights, const uint8_t *src, size_t srclen, unsigned flags)
Definition: ctype-big5.cc:1266
unsigned my_instr_mb(const CHARSET_INFO *cs, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, unsigned nmatch)
Definition: ctype-mb.cc:357
int my_wildcmp_mb(const CHARSET_INFO *cs, 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:308
int my_strcasecmp_mb(const CHARSET_INFO *cs, const char *s, const char *t)
Definition: ctype-mb.cc:194
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:657
bool my_propagate_simple(const CHARSET_INFO *cs, const uint8_t *str, size_t length)
Definition: ctype-simple.cc:1474
size_t my_strnxfrmlen_simple(const CHARSET_INFO *cs, size_t len)
Definition: ctype-simple.cc:62
void my_hash_sort_simple(const CHARSET_INFO *cs, const uint8_t *key, size_t len, uint64_t *nr1, uint64_t *nr2)
Definition: ctype-simple.cc:288

◆ sort_order_big5

const uint8_t sort_order_big5[]
static

◆ tab_big5_uni0

const uint16_t tab_big5_uni0[]
static

◆ tab_big5_uni1

const uint16_t tab_big5_uni1[]
static

◆ tab_uni_big50

const uint16_t 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_t tab_uni_big51[]
static

◆ tab_uni_big510

const uint16_t tab_uni_big510[]
static

◆ tab_uni_big52

const uint16_t tab_uni_big52[]
static

◆ tab_uni_big53

const uint16_t tab_uni_big53[]
static

◆ tab_uni_big54

const uint16_t tab_uni_big54[]
static

◆ tab_uni_big55

const uint16_t tab_uni_big55[] = {0xA1C0}
static

◆ tab_uni_big56

const uint16_t 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_t tab_uni_big57[]
static

◆ tab_uni_big58

const uint16_t tab_uni_big58[]
static

◆ tab_uni_big59

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

◆ to_lower_big5

const uint8_t to_lower_big5[]
static

◆ to_upper_big5

const uint8_t to_upper_big5[]
static