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

Macros

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

Functions

static unsigned ismbchar_gb2312 (const CHARSET_INFO *cs, const char *p, const char *e)
 
static unsigned mbcharlen_gb2312 (const CHARSET_INFO *cs, unsigned 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, uint8_t *s, uint8_t *e)
 
static int my_mb_wc_gb2312 (const CHARSET_INFO *cs, my_wc_t *pwc, const uint8_t *s, const uint8_t *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 uint8_t ctype_gb2312 [257]
 
static const uint8_t to_lower_gb2312 []
 
static const uint8_t to_upper_gb2312 []
 
static const uint8_t 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_t tab_gb2312_uni0 []
 
static const uint16_t tab_gb2312_uni1 []
 
static const uint16_t tab_gb2312_uni2 []
 
static const uint16_t tab_uni_gb23120 []
 
static const uint16_t tab_uni_gb23121 []
 
static const uint16_t tab_uni_gb23122 []
 
static const uint16_t tab_uni_gb23123 []
 
static const uint16_t tab_uni_gb23124 []
 
static const uint16_t tab_uni_gb23125 []
 
static const uint16_t tab_uni_gb23126 []
 
static const uint16_t tab_uni_gb23127 []
 
static const uint16_t tab_uni_gb23128 []
 
static const uint16_t 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 <= (uint8_t)(c) && (uint8_t)(c) <= 0xf7)

◆ isgb2312tail

#define isgb2312tail (   c)    (0xa1 <= (uint8_t)(c) && (uint8_t)(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 unsigned ismbchar_gb2312 ( const CHARSET_INFO cs,
const char *  p,
const char *  e 
)
static

◆ mbcharlen_gb2312()

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

◆ my_mb_wc_gb2312()

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

◆ my_wc_mb_gb2312()

static int my_wc_mb_gb2312 ( const CHARSET_INFO cs,
my_wc_t  wc,
uint8_t *  s,
uint8_t *  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 uint8_t 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:6494
static int my_mb_wc_gb2312(const CHARSET_INFO *cs, my_wc_t *pwc, const uint8_t *s, const uint8_t *e)
Definition: ctype-gb2312.cc:6472
static unsigned ismbchar_gb2312(const CHARSET_INFO *cs, const char *p, const char *e)
Definition: ctype-gb2312.cc:244
static int my_wc_mb_gb2312(const CHARSET_INFO *cs, my_wc_t wc, uint8_t *s, uint8_t *e)
Definition: ctype-gb2312.cc:6451
static unsigned mbcharlen_gb2312(const CHARSET_INFO *cs, unsigned c)
Definition: ctype-gb2312.cc:250
int my_mb_ctype_mb(const CHARSET_INFO *cs, int *ctype, const uint8_t *s, const uint8_t *e)
Definition: ctype-mb.cc:1321
size_t my_numchars_mb(const CHARSET_INFO *cs, const char *pos, const char *end)
Definition: ctype-mb.cc:314
size_t my_casedn_mb(const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:111
size_t my_casedn_str_mb(const CHARSET_INFO *cs, char *str)
Definition: ctype-mb.cc:57
size_t my_caseup_mb(const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-mb.cc:84
size_t my_charpos_mb3(const CHARSET_INFO *cs, const char *pos, const char *end, size_t length)
Definition: ctype-mb.cc:325
size_t my_caseup_str_mb(const CHARSET_INFO *cs, char *str)
Definition: ctype-mb.cc:40
size_t my_numcells_8bit(const CHARSET_INFO *cs, const char *b, const char *e)
Definition: ctype-simple.cc:907
long long my_strtoll10_8bit(const CHARSET_INFO *cs, const char *nptr, const char **endptr, int *error)
Definition: ctype-simple.cc:1124
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:1220
double my_strntod_8bit(const CHARSET_INFO *cs, const char *str, size_t length, const char **end, int *err)
Definition: ctype-simple.cc:635
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:460
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:685
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:649
size_t my_lengthsp_8bit(const CHARSET_INFO *cs, const char *ptr, size_t length)
Definition: ctype-simple.cc:926
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:538
size_t my_snprintf_8bit(const CHARSET_INFO *cs, char *to, size_t n, const char *fmt,...)
Definition: ctype-simple.cc:277
void my_fill_8bit(const CHARSET_INFO *cs, char *s, size_t l, int fill)
Definition: ctype-simple.cc:897
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:388
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:310
size_t my_scan_8bit(const CHARSET_INFO *cs, const char *str, const char *end, int sq)
Definition: ctype-simple.cc:875

◆ my_collation_ci_handler

MY_COLLATION_HANDLER my_collation_ci_handler
static
Initial value:
= {
nullptr,
nullptr,
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:356
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:307
int my_strcasecmp_mb(const CHARSET_INFO *cs, const char *s, const char *t)
Definition: ctype-mb.cc:193
size_t my_strnxfrm_mb(const CHARSET_INFO *cs, uint8_t *dst, size_t dstlen, unsigned nweights, const uint8_t *src, size_t srclen, unsigned flags)
Definition: ctype-mb.cc:495
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:656
int my_strnncoll_simple(const CHARSET_INFO *cs, const uint8_t *s, size_t slen, const uint8_t *t, size_t tlen, bool t_is_prefix)
Definition: ctype-simple.cc:132
bool my_propagate_simple(const CHARSET_INFO *cs, const uint8_t *str, size_t length)
Definition: ctype-simple.cc:1473
size_t my_strnxfrmlen_simple(const CHARSET_INFO *cs, size_t len)
Definition: ctype-simple.cc:61
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:287
int my_strnncollsp_simple(const CHARSET_INFO *cs, const uint8_t *a, size_t a_length, const uint8_t *b, size_t b_length)
Definition: ctype-simple.cc:174

◆ sort_order_gb2312

const uint8_t sort_order_gb2312[]
static

◆ tab_gb2312_uni0

const uint16_t tab_gb2312_uni0[]
static

◆ tab_gb2312_uni1

const uint16_t tab_gb2312_uni1[]
static

◆ tab_gb2312_uni2

const uint16_t tab_gb2312_uni2[]
static

◆ tab_uni_gb23120

const uint16_t tab_uni_gb23120[]
static

◆ tab_uni_gb23121

const uint16_t tab_uni_gb23121[]
static

◆ tab_uni_gb23122

const uint16_t tab_uni_gb23122[]
static

◆ tab_uni_gb23123

const uint16_t tab_uni_gb23123[]
static

◆ tab_uni_gb23124

const uint16_t tab_uni_gb23124[]
static

◆ tab_uni_gb23125

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

◆ tab_uni_gb23126

const uint16_t tab_uni_gb23126[]
static

◆ tab_uni_gb23127

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

◆ tab_uni_gb23129

const uint16_t 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 uint8_t to_lower_gb2312[]
static

◆ to_upper_gb2312

const uint8_t to_upper_gb2312[]
static