MySQL 8.0.29
Source Code Documentation
ctype-gb2312.cc File Reference
#include <stddef.h>
#include <sys/types.h>
#include "m_ctype.h"
#include "my_compiler.h"
#include "my_inttypes.h"

Macros

#define isgb2312head(c)   (0xa1 <= (uchar)(c) && (uchar)(c) <= 0xf7)
 
#define isgb2312tail(c)   (0xa1 <= (uchar)(c) && (uchar)(c) <= 0xfe)
 

Functions

static uint ismbchar_gb2312 (const CHARSET_INFO *cs, const char *p, const char *e)
 
static uint mbcharlen_gb2312 (const CHARSET_INFO *cs, uint c)
 
static int func_gb2312_uni_onechar (int code)
 
static int func_uni_gb2312_onechar (int code)
 
static int my_wc_mb_gb2312 (const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
 
static int my_mb_wc_gb2312 (const CHARSET_INFO *cs, my_wc_t *pwc, const uchar *s, const uchar *e)
 
static size_t my_well_formed_len_gb2312 (const CHARSET_INFO *cs, const char *b, const char *e, size_t pos, int *error)
 

Variables

static const uchar ctype_gb2312 [257]
 
static const uchar to_lower_gb2312 []
 
static const uchar to_upper_gb2312 []
 
static const uchar sort_order_gb2312 []
 
static const MY_UNICASE_CHARACTER cA2 [256]
 
static const MY_UNICASE_CHARACTER cA3 [256]
 
static const MY_UNICASE_CHARACTER cA6 [256]
 
static const MY_UNICASE_CHARACTER cA7 [256]
 
static const MY_UNICASE_CHARACTER cA8 [256]
 
static const MY_UNICASE_CHARACTERmy_caseinfo_pages_gb2312 [256]
 
static MY_UNICASE_INFO my_caseinfo_gb2312 = {0xFFFF, my_caseinfo_pages_gb2312}
 
static const uint16 tab_gb2312_uni0 []
 
static const uint16 tab_gb2312_uni1 []
 
static const uint16 tab_gb2312_uni2 []
 
static const uint16 tab_uni_gb23120 []
 
static const uint16 tab_uni_gb23121 []
 
static const uint16 tab_uni_gb23122 []
 
static const uint16 tab_uni_gb23123 []
 
static const uint16 tab_uni_gb23124 []
 
static const uint16 tab_uni_gb23125 []
 
static const uint16 tab_uni_gb23126 []
 
static const uint16 tab_uni_gb23127 []
 
static const uint16 tab_uni_gb23128 []
 
static const uint16 tab_uni_gb23129 []
 
static MY_COLLATION_HANDLER my_collation_ci_handler
 
static MY_CHARSET_HANDLER my_charset_handler
 
CHARSET_INFO my_charset_gb2312_chinese_ci
 
CHARSET_INFO my_charset_gb2312_bin
 

Macro Definition Documentation

◆ isgb2312head

#define isgb2312head (   c)    (0xa1 <= (uchar)(c) && (uchar)(c) <= 0xf7)

◆ isgb2312tail

#define isgb2312tail (   c)    (0xa1 <= (uchar)(c) && (uchar)(c) <= 0xfe)

Function Documentation

◆ func_gb2312_uni_onechar()

static int func_gb2312_uni_onechar ( int  code)
static

◆ func_uni_gb2312_onechar()

static int func_uni_gb2312_onechar ( int  code)
static

◆ ismbchar_gb2312()

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

◆ mbcharlen_gb2312()

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

◆ my_mb_wc_gb2312()

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

◆ my_wc_mb_gb2312()

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

◆ my_well_formed_len_gb2312()

static size_t my_well_formed_len_gb2312 ( 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

◆ cA6

const MY_UNICASE_CHARACTER cA6[256]
static

◆ cA7

const MY_UNICASE_CHARACTER cA7[256]
static

◆ cA8

const MY_UNICASE_CHARACTER cA8[256]
static

◆ ctype_gb2312

const uchar ctype_gb2312[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, 3, 3, 3, 3, 3, 0,
}

◆ my_caseinfo_gb2312

MY_UNICASE_INFO my_caseinfo_gb2312 = {0xFFFF, my_caseinfo_pages_gb2312}
static

◆ my_caseinfo_pages_gb2312

const MY_UNICASE_CHARACTER* my_caseinfo_pages_gb2312[256]
static

◆ my_charset_gb2312_bin

CHARSET_INFO my_charset_gb2312_bin

◆ my_charset_gb2312_chinese_ci

CHARSET_INFO my_charset_gb2312_chinese_ci

◆ my_charset_handler

MY_CHARSET_HANDLER my_charset_handler
static
Initial value:
= {nullptr,
static size_t my_well_formed_len_gb2312(const CHARSET_INFO *cs, const char *b, const char *e, size_t pos, int *error)
Definition: ctype-gb2312.cc:6487
static uint ismbchar_gb2312(const CHARSET_INFO *cs, const char *p, const char *e)
Definition: ctype-gb2312.cc:238
static int my_wc_mb_gb2312(const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
Definition: ctype-gb2312.cc:6444
static uint mbcharlen_gb2312(const CHARSET_INFO *cs, uint c)
Definition: ctype-gb2312.cc:244
static int my_mb_wc_gb2312(const CHARSET_INFO *cs, my_wc_t *pwc, const uchar *s, const uchar *e)
Definition: ctype-gb2312.cc:6465
size_t my_casedn_str_mb(const CHARSET_INFO *, char *)
Definition: ctype-mb.cc:60
double my_strntod_8bit(const CHARSET_INFO *, const char *s, size_t l, const char **e, int *err)
Definition: ctype-simple.cc:645
size_t my_snprintf_8bit(const CHARSET_INFO *, char *to, size_t n, const char *fmt,...)
Definition: ctype-simple.cc:280
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:1234
ulong my_strntoul_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:396
size_t my_caseup_mb(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:87
void my_fill_8bit(const CHARSET_INFO *cs, char *to, size_t l, int fill)
Definition: ctype-simple.cc:906
size_t my_casedn_mb(const CHARSET_INFO *, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:114
size_t my_caseup_str_mb(const CHARSET_INFO *, char *)
Definition: ctype-mb.cc:43
size_t my_longlong10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l, int radix, longlong val)
Definition: ctype-simple.cc:694
size_t my_numchars_mb(const CHARSET_INFO *, const char *b, const char *e)
Definition: ctype-mb.cc:319
int my_mb_ctype_mb(const CHARSET_INFO *, int *, const uchar *, const uchar *)
Definition: ctype-mb.cc:1323
long my_strntol_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:317
size_t my_lengthsp_8bit(const CHARSET_INFO *cs, const char *ptr, size_t length)
Definition: ctype-simple.cc:935
size_t my_charpos_mb(const CHARSET_INFO *, const char *b, const char *e, size_t pos)
Definition: ctype-mb.cc:330
longlong my_strtoll10_8bit(const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error)
Definition: ctype-simple.cc:1138
size_t my_numcells_8bit(const CHARSET_INFO *, const char *b, const char *e)
Definition: ctype-simple.cc:916
size_t my_long10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l, int radix, long int val)
Definition: ctype-simple.cc:658
ulonglong my_strntoull_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:548
size_t my_scan_8bit(const CHARSET_INFO *cs, const char *b, const char *e, int sq)
Definition: ctype-simple.cc:884
longlong my_strntoll_8bit(const CHARSET_INFO *, const char *s, size_t l, int base, const char **e, int *err)
Definition: ctype-simple.cc:469

◆ my_collation_ci_handler

MY_COLLATION_HANDLER my_collation_ci_handler
static
Initial value:
= {
nullptr,
nullptr,
size_t my_strnxfrmlen_simple(const CHARSET_INFO *, size_t)
Definition: ctype-simple.cc:63
int my_strnncoll_simple(const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t, bool)
Definition: ctype-simple.cc:136
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:361
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:312
void my_hash_sort_simple(const CHARSET_INFO *cs, const uchar *key, size_t len, uint64 *nr1, uint64 *nr2)
Definition: ctype-simple.cc:290
int my_strcasecmp_mb(const CHARSET_INFO *cs, const char *, const char *)
Definition: ctype-mb.cc:196
size_t my_strnxfrm_mb(const CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags)
Definition: ctype-mb.cc:501
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:660
bool my_propagate_simple(const CHARSET_INFO *cs, const uchar *str, size_t len)
Definition: ctype-simple.cc:1483
int my_strnncollsp_simple(const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t)
Definition: ctype-simple.cc:178

◆ sort_order_gb2312

const uchar sort_order_gb2312[]
static

◆ tab_gb2312_uni0

const uint16 tab_gb2312_uni0[]
static

◆ tab_gb2312_uni1

const uint16 tab_gb2312_uni1[]
static

◆ tab_gb2312_uni2

const uint16 tab_gb2312_uni2[]
static

◆ tab_uni_gb23120

const uint16 tab_uni_gb23120[]
static

◆ tab_uni_gb23121

const uint16 tab_uni_gb23121[]
static

◆ tab_uni_gb23122

const uint16 tab_uni_gb23122[]
static

◆ tab_uni_gb23123

const uint16 tab_uni_gb23123[]
static

◆ tab_uni_gb23124

const uint16 tab_uni_gb23124[]
static

◆ tab_uni_gb23125

const uint16 tab_uni_gb23125[]
static
Initial value:
= {0x2265, 0x2266, 0x2267, 0x2268,
0x2269, 0x226A, 0x226B, 0x226C,
0x226D, 0x226E}

◆ tab_uni_gb23126

const uint16 tab_uni_gb23126[]
static

◆ tab_uni_gb23127

const uint16 tab_uni_gb23127[]
static
Initial value:
= {
0x5363, 0, 0, 0x764F, 0, 0x4233, 0x7650, 0, 0,
0x7651, 0x7652, 0x7653, 0x7654, 0, 0, 0x7656, 0, 0x312B,
0x7657, 0, 0x7658, 0x7659, 0x765A, 0, 0x765B, 0x765C, 0,
0, 0, 0, 0x765D, 0x765E, 0x4F4A, 0, 0x765F, 0x7660,
0x7661, 0x7662, 0x7663, 0x7664, 0x4070, 0x7665, 0x7666, 0x7667, 0x7668,
0x7669, 0, 0x766A, 0, 0x766B, 0x766C, 0, 0x766D, 0x766E,
0x766F, 0x7670, 0x7671, 0x7672, 0x7673, 0x7674, 0x3E28, 0, 0x7675,
0x7676, 0x7677, 0x7678, 0, 0, 0, 0, 0, 0x487A,
0x7679, 0x767A, 0x767B, 0x767C, 0, 0, 0x767D, 0x767E, 0x7721,
0x7722, 0x7723, 0x7724, 0x7725, 0, 0, 0x7726, 0x7727, 0x7728,
0x316E, 0x7729, 0x772A, 0x772B, 0, 0, 0x772C, 0x772D, 0x415B,
0x772E, 0, 0, 0x772F}

◆ tab_uni_gb23128

const uint16 tab_uni_gb23128[]
static

◆ tab_uni_gb23129

const uint16 tab_uni_gb23129[]
static
Initial value:
= {
0x2321, 0x2322, 0x2323, 0x2167, 0x2325, 0x2326, 0x2327, 0x2328, 0x2329,
0x232A, 0x232B, 0x232C, 0x232D, 0x232E, 0x232F, 0x2330, 0x2331, 0x2332,
0x2333, 0x2334, 0x2335, 0x2336, 0x2337, 0x2338, 0x2339, 0x233A, 0x233B,
0x233C, 0x233D, 0x233E, 0x233F, 0x2340, 0x2341, 0x2342, 0x2343, 0x2344,
0x2345, 0x2346, 0x2347, 0x2348, 0x2349, 0x234A, 0x234B, 0x234C, 0x234D,
0x234E, 0x234F, 0x2350, 0x2351, 0x2352, 0x2353, 0x2354, 0x2355, 0x2356,
0x2357, 0x2358, 0x2359, 0x235A, 0x235B, 0x235C, 0x235D, 0x235E, 0x235F,
0x2360, 0x2361, 0x2362, 0x2363, 0x2364, 0x2365, 0x2366, 0x2367, 0x2368,
0x2369, 0x236A, 0x236B, 0x236C, 0x236D, 0x236E, 0x236F, 0x2370, 0x2371,
0x2372, 0x2373, 0x2374, 0x2375, 0x2376, 0x2377, 0x2378, 0x2379, 0x237A,
0x237B, 0x237C, 0x237D, 0x212B, 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, 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,
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, 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, 0x2169, 0x216A,
0, 0x237E, 0, 0x2324}

◆ to_lower_gb2312

const uchar to_lower_gb2312[]
static

◆ to_upper_gb2312

const uchar to_upper_gb2312[]
static