MySQL 8.0.39
Source Code Documentation
ctype-ujis.cc File Reference
#include <assert.h>
#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 isujis(c)   ((0xa1 <= ((c)&0xff) && ((c)&0xff) <= 0xfe))
 
#define iskata(c)   ((0xa1 <= ((c)&0xff) && ((c)&0xff) <= 0xdf))
 
#define isujis_ss2(c)   (((c)&0xff) == 0x8e)
 
#define isujis_ss3(c)   (((c)&0xff) == 0x8f)
 

Functions

static uint ismbchar_ujis (const CHARSET_INFO *cs, const char *p, const char *e)
 
static uint mbcharlen_ujis (const CHARSET_INFO *cs, uint c)
 
static size_t my_well_formed_len_ujis (const CHARSET_INFO *cs, const char *beg, const char *end, size_t pos, int *error)
 
static size_t my_numcells_eucjp (const CHARSET_INFO *cs, const char *str, const char *str_end)
 
static int my_mb_wc_euc_jp (const CHARSET_INFO *cs, my_wc_t *pwc, const uchar *s, const uchar *e)
 Scans an UJIS character from the input string and converts to Unicode code point. More...
 
static int my_wc_mb_euc_jp (const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
 Puts the given Unicode character into an UJIS string. More...
 
static const MY_UNICASE_CHARACTERget_case_info_for_ch (const CHARSET_INFO *cs, uint plane, uint page, uint offs)
 
static size_t my_casefold_ujis (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen, const uchar *map, size_t is_upper)
 
size_t my_casedn_ujis (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen)
 
size_t my_caseup_ujis (const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen)
 

Variables

static const uchar ctype_ujis [257]
 
static const uchar to_lower_ujis []
 
static const uchar to_upper_ujis []
 
static const uchar sort_order_ujis []
 
static const uint16 jisx0208_eucjp_to_unicode [65536]
 
static const uint16 unicode_to_jisx0208_eucjp [65536]
 
static const uint16 jisx0212_eucjp_to_unicode [65536]
 
static const uint16 unicode_to_jisx0212_eucjp [65536]
 
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 c8FA6 []
 
static const MY_UNICASE_CHARACTER c8FA7 []
 
static const MY_UNICASE_CHARACTER c8FA9 []
 
static const MY_UNICASE_CHARACTER c8FAA []
 
static const MY_UNICASE_CHARACTER c8FAB []
 
static const MY_UNICASE_CHARACTERmy_caseinfo_pages_ujis [512]
 
static MY_UNICASE_INFO my_caseinfo_ujis = {0x0FFFF, my_caseinfo_pages_ujis}
 
static MY_COLLATION_HANDLER my_collation_ci_handler
 
static MY_CHARSET_HANDLER my_charset_handler
 
CHARSET_INFO my_charset_ujis_japanese_ci
 
CHARSET_INFO my_charset_ujis_bin
 

Macro Definition Documentation

◆ iskata

#define iskata (   c)    ((0xa1 <= ((c)&0xff) && ((c)&0xff) <= 0xdf))

◆ isujis

#define isujis (   c)    ((0xa1 <= ((c)&0xff) && ((c)&0xff) <= 0xfe))

◆ isujis_ss2

#define isujis_ss2 (   c)    (((c)&0xff) == 0x8e)

◆ isujis_ss3

#define isujis_ss3 (   c)    (((c)&0xff) == 0x8f)

Function Documentation

◆ get_case_info_for_ch()

static const MY_UNICASE_CHARACTER * get_case_info_for_ch ( const CHARSET_INFO cs,
uint  plane,
uint  page,
uint  offs 
)
static

◆ ismbchar_ujis()

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

◆ mbcharlen_ujis()

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

◆ my_casedn_ujis()

size_t my_casedn_ujis ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_casefold_ujis()

static size_t my_casefold_ujis ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen,
const uchar map,
size_t  is_upper 
)
static

◆ my_caseup_ujis()

size_t my_caseup_ujis ( const CHARSET_INFO cs,
char *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)

◆ my_mb_wc_euc_jp()

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

Scans an UJIS 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
3If a 3-byte character was scanned
-2If a 2-byte unassigned character was scanned
-3If a 3-byte unassigned character was scanned
MY_CS_ILSEQIf a wrong byte sequence was found

◆ my_numcells_eucjp()

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

◆ my_wc_mb_euc_jp()

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

Puts the given Unicode character into an UJIS 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 UJIS

◆ my_well_formed_len_ujis()

static size_t my_well_formed_len_ujis ( const CHARSET_INFO cs,
const char *  beg,
const char *  end,
size_t  pos,
int *  error 
)
static

Variable Documentation

◆ c8FA6

const MY_UNICASE_CHARACTER c8FA6[]
static

◆ c8FA7

const MY_UNICASE_CHARACTER c8FA7[]
static

◆ c8FA9

const MY_UNICASE_CHARACTER c8FA9[]
static

◆ c8FAA

const MY_UNICASE_CHARACTER c8FAA[]
static

◆ c8FAB

const MY_UNICASE_CHARACTER c8FAB[]
static

◆ 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

◆ ctype_ujis

const uchar ctype_ujis[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,
0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000,
0000, 0000, 0020, 0020, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000,
0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 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,
}

◆ jisx0208_eucjp_to_unicode

const uint16 jisx0208_eucjp_to_unicode[65536]
static

◆ jisx0212_eucjp_to_unicode

const uint16 jisx0212_eucjp_to_unicode[65536]
static

◆ my_caseinfo_pages_ujis

const MY_UNICASE_CHARACTER* my_caseinfo_pages_ujis[512]
static

◆ my_caseinfo_ujis

MY_UNICASE_INFO my_caseinfo_ujis = {0x0FFFF, my_caseinfo_pages_ujis}
static

◆ my_charset_handler

MY_CHARSET_HANDLER my_charset_handler
static
Initial value:
= {nullptr,
size_t my_casedn_ujis(const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-ujis.cc:35762
static int my_wc_mb_euc_jp(const CHARSET_INFO *cs, my_wc_t wc, uchar *s, uchar *e)
Puts the given Unicode character into an UJIS string.
Definition: ctype-ujis.cc:33246
static uint ismbchar_ujis(const CHARSET_INFO *cs, const char *p, const char *e)
Definition: ctype-ujis.cc:284
size_t my_caseup_ujis(const CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen)
Definition: ctype-ujis.cc:35772
static size_t my_numcells_eucjp(const CHARSET_INFO *cs, const char *str, const char *str_end)
Definition: ctype-ujis.cc:354
static uint mbcharlen_ujis(const CHARSET_INFO *cs, uint c)
Definition: ctype-ujis.cc:298
static size_t my_well_formed_len_ujis(const CHARSET_INFO *cs, const char *beg, const char *end, size_t pos, int *error)
Definition: ctype-ujis.cc:310
static int my_mb_wc_euc_jp(const CHARSET_INFO *cs, my_wc_t *pwc, const uchar *s, const uchar *e)
Scans an UJIS character from the input string and converts to Unicode code point.
Definition: ctype-ujis.cc:33192
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
void my_fill_8bit(const CHARSET_INFO *cs, char *to, size_t l, int fill)
Definition: ctype-simple.cc:907
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_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_charset_ujis_bin

CHARSET_INFO my_charset_ujis_bin

◆ my_charset_ujis_japanese_ci

CHARSET_INFO my_charset_ujis_japanese_ci

◆ 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:64
int my_strnncoll_simple(const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t, bool)
Definition: ctype-simple.cc:137
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
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:502
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
int my_strnncollsp_simple(const CHARSET_INFO *, const uchar *, size_t, const uchar *, size_t)
Definition: ctype-simple.cc:179

◆ sort_order_ujis

const uchar sort_order_ujis[]
static

◆ to_lower_ujis

const uchar to_lower_ujis[]
static

◆ to_upper_ujis

const uchar to_upper_ujis[]
static

◆ unicode_to_jisx0208_eucjp

const uint16 unicode_to_jisx0208_eucjp[65536]
static

◆ unicode_to_jisx0212_eucjp

const uint16 unicode_to_jisx0212_eucjp[65536]
static