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

Macros

#define iscp932head(c)    ((0x81 <= (c) && (c) <= 0x9f) || ((0xe0 <= (c)) && (c) <= 0xfc))
 
#define iscp932tail(c)    ((0x40 <= (c) && (c) <= 0x7e) || (0x80 <= (c) && (c) <= 0xfc))
 
#define cp932code(c, d)   ((((uint)(uchar)(c)) << 8) | (uint)(uchar)(d))
 

Functions

static uint ismbchar_cp932 (const CHARSET_INFO *cs, const char *p, const char *e)
 
static uint mbcharlen_cp932 (const CHARSET_INFO *cs, uint c)
 
static int my_strnncoll_cp932_internal (const CHARSET_INFO *cs, const uchar **a_res, size_t a_length, const uchar **b_res, size_t b_length)
 
static int my_strnncoll_cp932 (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_cp932 (const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length)
 
static int my_mb_wc_cp932 (const CHARSET_INFO *cs, my_wc_t *pwc, const uchar *s, const uchar *e)
 Scans a CP932 character from the input string and converts to Unicode code point. More...
 
static int my_wc_mb_cp932 (const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
 Puts the given Unicode character into a CP932 string. More...
 
static size_t my_numcells_cp932 (const CHARSET_INFO *cs, const char *str, const char *str_end)
 
static size_t my_well_formed_len_cp932 (const CHARSET_INFO *cs, const char *b, const char *e, size_t pos, int *error)
 

Variables

static const uchar ctype_cp932 [257]
 
static const uchar to_lower_cp932 []
 
static const uchar to_upper_cp932 []
 
static const uchar sort_order_cp932 []
 
static const MY_UNICASE_CHARACTER c81 [256]
 
static const MY_UNICASE_CHARACTER c82 [256]
 
static const MY_UNICASE_CHARACTER c83 [256]
 
static const MY_UNICASE_CHARACTER c84 [256]
 
static const MY_UNICASE_CHARACTER c87 [256]
 
static const MY_UNICASE_CHARACTER cEE [256]
 
static const MY_UNICASE_CHARACTER cFA [256]
 
static const MY_UNICASE_CHARACTERmy_caseinfo_pages_cp932 [256]
 
MY_UNICASE_INFO my_caseinfo_cp932 = {0xFFFF, my_caseinfo_pages_cp932}
 
static const uint16 cp932_to_unicode [65536]
 
static const uint16 unicode_to_cp932 [65536]
 
static MY_COLLATION_HANDLER my_collation_ci_handler
 
static MY_CHARSET_HANDLER my_charset_handler
 
CHARSET_INFO my_charset_cp932_japanese_ci
 
CHARSET_INFO my_charset_cp932_bin
 

Macro Definition Documentation

◆ cp932code

#define cp932code (   c,
 
)    ((((uint)(uchar)(c)) << 8) | (uint)(uchar)(d))

◆ iscp932head

#define iscp932head (   c)     ((0x81 <= (c) && (c) <= 0x9f) || ((0xe0 <= (c)) && (c) <= 0xfc))

◆ iscp932tail

#define iscp932tail (   c)     ((0x40 <= (c) && (c) <= 0x7e) || (0x80 <= (c) && (c) <= 0xfc))

Function Documentation

◆ ismbchar_cp932()

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

◆ mbcharlen_cp932()

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

◆ my_mb_wc_cp932()

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

Scans a CP932 character from the input string and converts to Unicode code point.

Parameters
[in]csCharacter set info, unused
[out]pwcUnicode code point
[in]sBeginning of the input string
[in]eEnd of the input string
Return values
MY_CS_TOOSMALLIf the string was too short to scan a character
1If a 1-byte character was scanned
2If a 2-byte character was scanned
-2If a 2-byte unassigned character was scanned
MY_CS_ILSEQIf a wrong byte sequence was found

◆ my_numcells_cp932()

static size_t my_numcells_cp932 ( const CHARSET_INFO cs,
const char *  str,
const char *  str_end 
)
static

◆ my_strnncoll_cp932()

static int my_strnncoll_cp932 ( 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_cp932_internal()

static int my_strnncoll_cp932_internal ( const CHARSET_INFO cs,
const uchar **  a_res,
size_t  a_length,
const uchar **  b_res,
size_t  b_length 
)
static

◆ my_strnncollsp_cp932()

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

◆ my_wc_mb_cp932()

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

Puts the given Unicode character into a CP932 string.

Parameters
[in]csCharacter set info, unused
[in]wcUnicode code point
[in]sBeginning of the out string
[in]eEnd of the out string
Return values
MY_CS_TOOSMALLIf the string was too short to put a character
1If a 1-byte character was put
2If a 2-byte character was put
MY_CS_ILUNIIf the Unicode character does not exist in CP932

◆ my_well_formed_len_cp932()

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

Variable Documentation

◆ c81

const MY_UNICASE_CHARACTER c81[256]
static

◆ c82

const MY_UNICASE_CHARACTER c82[256]
static

◆ c83

const MY_UNICASE_CHARACTER c83[256]
static

◆ c84

const MY_UNICASE_CHARACTER c84[256]
static

◆ c87

const MY_UNICASE_CHARACTER c87[256]
static

◆ cEE

const MY_UNICASE_CHARACTER cEE[256]
static

◆ cFA

const MY_UNICASE_CHARACTER cFA[256]
static

◆ cp932_to_unicode

const uint16 cp932_to_unicode[65536]
static

◆ ctype_cp932

const uchar ctype_cp932[257]
static
Initial value:
= {
0,
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,
0040, 0050, 0050, 0050, 0050, 0050, 0040, 0040,
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,
0110, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0204, 0204, 0204, 0204, 0204, 0204, 0204, 0204,
0204, 0204, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0201, 0201, 0201, 0201, 0201, 0201, 0001,
0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001,
0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001,
0001, 0001, 0001, 0020, 0020, 0020, 0020, 0020,
0020, 0202, 0202, 0202, 0202, 0202, 0202, 0002,
0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002,
0002, 0002, 0002, 0002, 0002, 0002, 0002, 0002,
0002, 0002, 0002, 0020, 0020, 0020, 0020, 0040,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0020,
0020, 0020, 0020, 0020, 0020, 0000, 0000, 0000}

◆ my_caseinfo_cp932

MY_UNICASE_INFO my_caseinfo_cp932 = {0xFFFF, my_caseinfo_pages_cp932}

◆ my_caseinfo_pages_cp932

const MY_UNICASE_CHARACTER* my_caseinfo_pages_cp932[256]
static

◆ my_charset_cp932_bin

CHARSET_INFO my_charset_cp932_bin

◆ my_charset_cp932_japanese_ci

CHARSET_INFO my_charset_cp932_japanese_ci

◆ my_charset_handler

MY_CHARSET_HANDLER my_charset_handler
static
Initial value:
= {nullptr,
static uint mbcharlen_cp932(const CHARSET_INFO *cs, uint c)
Definition: ctype-cp932.cc:252
static size_t my_well_formed_len_cp932(const CHARSET_INFO *cs, const char *b, const char *e, size_t pos, int *error)
Definition: ctype-cp932.cc:18735
static size_t my_numcells_cp932(const CHARSET_INFO *cs, const char *str, const char *str_end)
Definition: ctype-cp932.cc:18709
static int my_wc_mb_cp932(const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
Puts the given Unicode character into a CP932 string.
Definition: ctype-cp932.cc:18677
static uint ismbchar_cp932(const CHARSET_INFO *cs, const char *p, const char *e)
Definition: ctype-cp932.cc:245
static int my_mb_wc_cp932(const CHARSET_INFO *cs, my_wc_t *pwc, const uchar *s, const uchar *e)
Scans a CP932 character from the input string and converts to Unicode code point.
Definition: ctype-cp932.cc:18637
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_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,
static int my_strnncollsp_cp932(const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length)
Definition: ctype-cp932.cc:2190
static int my_strnncoll_cp932(const CHARSET_INFO *cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length, bool b_is_prefix)
Definition: ctype-cp932.cc:2182
int my_strcasecmp_8bit(const CHARSET_INFO *cs, const char *, const char *)
Definition: ctype-simple.cc:244
size_t my_strnxfrmlen_simple(const CHARSET_INFO *, size_t)
Definition: ctype-simple.cc:63
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
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

◆ sort_order_cp932

const uchar sort_order_cp932[]
static

◆ to_lower_cp932

const uchar to_lower_cp932[]
static

◆ to_upper_cp932

const uchar to_upper_cp932[]
static

◆ unicode_to_cp932

const uint16 unicode_to_cp932[65536]
static