GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • Sign up
  • Explore
  • Enterprise
  • Education
  • Search
  • Help
  • Terms of use
  • About Us
  • Gitee Premium
  • Gitee AI
  • AI teammates

This view

  • Original page
  • New address

GeezerVison is showing gitee.com — strings/CHARSET_INFO.txt · 万里数据库/GreatSQL - Gitee

Fetch the repository succeeded.
Open Source > Database Related > Database Service &&
richgiteeai
Watch
Unwatch Watching Releases Only Ignoring
75
Star 800 Fork 122

GVP万里数据库 / GreatSQL

Code Issues 5 Pull Requests 0 Wiki Insights Pipelines
Service
Sonar mini
Quality Analysis
Jenkins for gitee
Jenkins for Gitee
Cloudbase
Tencent CloudBase
Cloud serverless
Tencent Cloud Serverless
Logo
悬镜安全
Sae
Aliyun SAE
Codeblitz
Codeblitz
Sbom
SBOM
Qilin profile
DevLens
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (11)
Tags (12)
Manage
Manage
master
greatsql-8.4.4-5
greatsql-8.4.4-4
greatsql-8.0.32-27
greatsql-8.0.32-25
greatsql-8.0.32-26
greatsql-8.0.32-24
greatsql-8.0.25-17
greatsql-8.0.25-16
greatsql-8.0.25-15
greatsql-5.7.36-39
GreatSQL-8.4.4-5
V8.4.4-5
GreatSQL-8.4.4-4
GreatSQL-8.4.4
GreatSQL-8.0.32-27
GreatSQL-8.0.32-26
GreatSQL-8.0.32-25
GreatSQL-8.0.32-24
GreatSQL-8.0.25-17
GreatSQL-8.0.25-16
GreatSQL-5.7.36-39
GreatSQL-8.0.25-15
master
Branches (11)
Tags (12)
Manage
Manage
master
greatsql-8.4.4-5
greatsql-8.4.4-4
greatsql-8.0.32-27
greatsql-8.0.32-25
greatsql-8.0.32-26
greatsql-8.0.32-24
greatsql-8.0.25-17
greatsql-8.0.25-16
greatsql-8.0.25-15
greatsql-5.7.36-39
GreatSQL-8.4.4-5
V8.4.4-5
GreatSQL-8.4.4-4
GreatSQL-8.4.4
GreatSQL-8.0.32-27
GreatSQL-8.0.32-26
GreatSQL-8.0.32-25
GreatSQL-8.0.32-24
GreatSQL-8.0.25-17
GreatSQL-8.0.25-16
GreatSQL-5.7.36-39
GreatSQL-8.0.25-15
Clone or Download
Clone/Download
HTTPS SSH SVN SVN+SSH Download ZIP
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://[email protected]': # Private Token
master
Branches (11)
Tags (12)
Manage
Manage
master
greatsql-8.4.4-5
greatsql-8.4.4-4
greatsql-8.0.32-27
greatsql-8.0.32-25
greatsql-8.0.32-26
greatsql-8.0.32-24
greatsql-8.0.25-17
greatsql-8.0.25-16
greatsql-8.0.25-15
greatsql-5.7.36-39
GreatSQL-8.4.4-5
V8.4.4-5
GreatSQL-8.4.4-4
GreatSQL-8.4.4
GreatSQL-8.0.32-27
GreatSQL-8.0.32-26
GreatSQL-8.0.32-25
GreatSQL-8.0.32-24
GreatSQL-8.0.25-17
GreatSQL-8.0.25-16
GreatSQL-5.7.36-39
GreatSQL-8.0.25-15
GreatSQL
/
strings
/
CHARSET_INFO.txt
Branches 11
Tags 12
GreatSQL
/
strings
/
CHARSET_INFO.txt
CHARSET_INFO.txt 11.72 KB
Copy Edit Raw Blame History
GreatSQL authored 2026-06-30 12:09 +08:00 . GreatSQL 8.4.4-5 GA(2026-06-30)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
Copyright (c) 2017, 2024, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have either included with
the program or referenced in the documentation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License, version 2.0, for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CHARSET_INFO
============
A structure containing data for charset+collation pair implementation.
Virtual functions that use this data are collected into separate
structures, MY_CHARSET_HANDLER and MY_COLLATION_HANDLER.
struct CHARSET_INFO
{
unsigned number;
unsigned primary_number;
unsigned binary_number;
unsigned state;
const char *csname;
const char *m_coll_name;
const char *comment;
const uint8_t *ctype;
const uint8_t *to_lower;
const uint8_t *to_upper;
const uint8_t *sort_order;
const uint16_t *tab_to_uni;
const MY_UNI_IDX *tab_from_uni;
uint8_t state_map[256];
uint8_t ident_map[256];
unsigned strxfrm_multiply;
unsigned mbminlen;
unsigned mbmaxlen;
unsigned mbmaxlenlen;
uint16_t max_sort_char; /* For LIKE optimization */
MY_CHARSET_HANDLER *cset;
MY_COLLATION_HANDLER *coll;
Pad_attribute pad_attribute;
};
CHARSET_INFO fields description:
===============================
Numbers (identifiers)
---------------------
number - an ID uniquely identifying this charset+collation pair.
primary_number - ID of a charset+collation pair, which consists
of the same character set and the default collation of this
character set. Not really used now. Intended to optimize some
parts of the code where we need to find the default collation
using its non-default counterpart for the given character set.
binary_number - ID of a charset+collation pair, which consists
of the same character set and the binary collation of this
character set. Not really used now.
Names
-----
csname - name of the character set for this charset+collation pair.
m_coll_name - name of the collation for this charset+collation pair.
comment - a text comment, displayed in "Description" column of
SHOW CHARACTER SET output.
Conversion tables
-----------------
ctype - pointer to array[257] of "type of characters"
bit mask for each character, e.g., whether a
character is a digit, letter, separator, etc.
Monty 2004-10-21:
If you look at the macros, we use ctype[(char)+1].
ctype[0] is traditionally in most ctype libraries
reserved for EOF (-1). The idea is that you can use
the result from fgetc() directly with ctype[]. As
we have to be compatible with external ctype[] versions,
it's better to do it the same way as they do...
to_lower - pointer to array[256] used in LCASE()
to_upper - pointer to array[256] used in UCASE()
sort_order - pointer to array[256] used for strings comparison
In all Asian charsets these arrays are set up as follows:
- All bytes in the range 0x80..0xFF were marked as letters in the
ctype array.
- The to_lower and to_upper arrays map only ASCII letters.
UPPER() and LOWER() doesn't really work for multi-byte characters.
Most of the characters in Asian character sets are ideograms
anyway and they don't have case mapping. However, there are
still some characters from European alphabets.
For example:
_ujis 0x8FAAF2 - LATIN CAPITAL LETTER Y WITH ACUTE
_ujis 0x8FABF2 - LATIN SMALL LETTER Y WITH ACUTE
But they don't map to each other with UPPER and LOWER operations.
- The sort_order array is filled case insensitively for the
ASCII range 0x00..0x7F, and in "binary" fashion for the multi-byte
range 0x80..0xFF for these collations:
cp932_japanese_ci,
euckr_korean_ci,
eucjpms_japanese_ci,
gb2312_chinese_ci,
sjis_japanese_ci,
ujis_japanese_ci.
So multi-byte characters are sorted just according to their codes.
- Two collations are still case insensitive for the ASCII characters,
but have special sorting order for multi-byte characters
(something more complex than just according to codes):
big5_chinese_ci
gbk_chinese_ci
So handlers for these collations use only the 0x00..0x7F part
of their sort_order arrays, and apply the special functions
for multi-byte characters
In Unicode character sets we have full support of UPPER/LOWER mapping,
for sorting order, and for character type detection.
"utf8_general_ci" still has the "old-fashioned" arrays
like to_upper, to_lower, sort_order and ctype, but they are
not really used (maybe only in some rare legacy functions).
Unicode conversion data
-----------------------
For 8-bit character sets:
tab_to_uni : array[256] of charset->Unicode translation
tab_from_uni: a structure for Unicode->charset translation
Non-8-bit charsets have their own structures per charset
hidden in corresponding ctype-xxx.c file and don't use
tab_to_uni and tab_from_uni tables.
Parser maps
-----------
state_map[]
ident_map[]
These maps are used to quickly identify whether a character is an
identifier part, a digit, a special character, or a part of another
SQL language lexical item.
Probably can be combined with ctype array in the future.
But for some reasons these two arrays are used in the parser,
while a separate ctype[] array is used in the other part of the
code, like fulltext, etc.
Miscellaneous fields
--------------------
strxfrm_multiply - how many times a sort key (that is, a string
that can be passed into memcmp() for comparison)
can be longer than the original string.
Usually it is 1. For some complex
collations it can be bigger. For example,
in latin1_german2_ci, a sort key is up to
two times longer than the original string.
e.g. Letter 'A' with two dots above is
substituted with 'AE'.
mbminlen - minimum multi-byte sequence length.
Now always 1 except for ucs2. For ucs2,
it is 2.
mbmaxlen - maximum multi-byte sequence length.
1 for 8-bit charsets. Can be also 2 or 3.
mbmaxlenlen - maximum leading bytes of a sequence to
determine the length of the multi-byte
sequence length.
max_sort_char - for LIKE range
in case of 8-bit character sets - native code
of maximum character (max_str pad byte);
in case of UTF8 and UCS2 - Unicode code of the maximum
possible character (usually U+FFFF). This code is
converted to multi-byte representation (usually 0xEFBFBF)
and then used as a pad sequence for max_str.
in case of other multi-byte character sets -
max_str pad byte (usually 0xFF).
pad_attribute - whether this collation is a PAD SPACE or NO PAD
collation. PAD SPACE collations treat strings
as if they were conceptually padded with an infinite
amount of space characters at the end.
MY_CHARSET_HANDLER
==================
MY_CHARSET_HANDLER is a collection of character-set
related routines. Defined in m_ctype.h. Have the
following set of functions:
Multi-byte routines
------------------
ismbchar() - detects whether the given string is a multi-byte sequence
mbcharlen() - returns length of multi-byte sequence starting with
the given character
numchars() - returns number of characters (in SQL terminology),
or code points (in character encoding terminology)
in the given string, e.g. in the SQL function CHAR_LENGTH().
charpos() - calculates the offset of the given position in the string.
Used in SQL functions LEFT(), RIGHT(), SUBSTRING(),
INSERT()
well_formed_len()
- returns length of a given multi-byte string in bytes
Used in INSERTs to shorten the given string so it
a) is "well formed" according to the given character set
b) can fit into the given data type
lengthsp() - returns the length of the given string without trailing spaces.
Unicode conversion routines
---------------------------
mb_wc - converts the left multi-byte sequence into its Unicode code.
@retval MY_CS_TOOSMALL If the string was too short to scan a character
@retval 1 If a 1-byte character was scanned
@retval 2 If a 2-byte character was scanned
@retval 3 If a 3-byte character was scanned
@retval -2 If a 2-byte unassigned character was scanned
@retval -3 If a 3-byte unassigned character was scanned
@retval MY_CS_ILSEQ If a wrong byte sequence was found
wc_mb - converts the given Unicode code into multi-byte sequence.
@retval MY_CS_TOOSMALL If the string was too short to put a character
@retval 1 If a 1-byte character was put
@retval 2 If a 2-byte character was put
@retval MY_CS_ILUNI If the Unicode character does not exist in the
given character set.
Case and sort conversion
------------------------
caseup_str - converts the given 0-terminated string to uppercase
casedn_str - converts the given 0-terminated string to lowercase
caseup - converts the given string to lowercase using length
casedn - converts the given string to lowercase using length
Number-to-string conversion routines
------------------------------------
snprintf()
long10_to_str()
longlong10_to_str()
The names are pretty self-describing.
String padding routines
-----------------------
fill() - writes the given Unicode value into the given string
with the given length. Used to pad the string, usually
with space character, according to the given charset.
String-to-number conversion routines
------------------------------------
strntol()
strntoul()
strntoll()
strntoull()
strntod()
These functions are almost the same as their STDLIB counterparts,
but also:
- accept length instead of 0-terminator
- are character set dependent
Simple scanner routines
-----------------------
scan() - to skip leading spaces in the given string.
Used when a string value is inserted into a numeric field.
MY_COLLATION_HANDLER
====================
strnncoll() - compares two strings according to the given collation
strnncollsp() - like the above but ignores trailing spaces for PAD SPACE
collations. For NO PAD collations, identical to strnncoll.
strnxfrm() - makes a sort key suitable for memcmp() corresponding
to the given string
like_range() - creates a LIKE range, for optimizer
wildcmp() - wildcard comparison, for LIKE
strcasecmp() - 0-terminated string comparison
instr() - finds the first substring appearance in the string
hash_sort() - calculates hash value taking into account
the collation rules, e.g. case-insensitivity,
accent sensitivity, etc.
Loading...
Go
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Type
Please select a report type
Reason
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

GreatSQL是一款开源免费数据库,可在普通硬件上满足金融级应用场景,具有高可用、高性能、高兼容、高安全等特性,可作为MySQL或Percona Server for MySQL的理想可选替换。 expand collapse
数据库
No labels
https://greatsql.cn/
unknown license
unknown open source license
800 Stars
75 Watching
122 Forks
Cancel

Releases (10)

All
GreatSQL 8.4.4-5

The Open Source Evaluation Index is derived from the OSS Compass evaluation system, which evaluates projects around the following three dimensions

1. Open source ecosystem

  • Productivity: To evaluate the ability of open-source projects to output software artifacts and open-source value.
  • Innovation: Used to evaluate the degree of diversity of open source software and its ecosystem.
  • Robustness: Used to evaluate the ability of open-source projects to resist internal and external interference and self recover in the face of changing development environments.

2. Collaboration, People, Software

  • Collaboration: represents the degree and depth of collaboration in open source development behavior.
  • Observe the influence of core personnel in open source projects, and examine the evaluations of users and developers on open source projects from a third-party perspective.
  • Software: Evaluate the value of products exported from open-source projects and their ultimate destination. It is also a concrete manifestation of "open source software", one of the oldest mainstream directions in open source evaluation.

3. Evaluation model

    Based on the dimensions of "open source ecosystem" and "collaboration, people, and software", identify quantifiable indicators directly or indirectly related to this goal, quantitatively evaluate the health and ecology of open source projects, and ultimately form an open source evaluation index.

Contributors

All

Language(Optional)

C++ 72.4% C 18.3% PHP 2.0% Java 1.7% Makefile 1.1% Other 4.5%

Activities

Load More
can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/GreatSQL/GreatSQL.git
[email protected]:GreatSQL/GreatSQL.git
GreatSQL
GreatSQL
GreatSQL
master
Going to Help Center

Search

Git 命令在线学习 如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.