File: ctype_casefolding.inc

package info (click to toggle)
mariadb 1%3A10.11.13-0%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 607,444 kB
  • sloc: ansic: 2,390,393; cpp: 1,764,452; asm: 378,315; perl: 62,256; java: 39,363; pascal: 38,853; sh: 38,128; sql: 19,830; yacc: 19,727; xml: 10,509; python: 9,780; ruby: 8,544; makefile: 6,130; cs: 5,855; ada: 1,700; lex: 1,207; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (32 lines) | stat: -rw-r--r-- 1,040 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
SHOW CREATE TABLE case_folding;
# Uncode code points that have a variable length case mapping in utf8
# (e.g.  LOWER('2-byte-character') -> '3-byte-character'
INSERT INTO case_folding (code) VALUES
(0x23A),
(0x23E),
(0x23F),
(0x240),
(0x250),
(0x251),
(0x252),
(0x26B),
(0x271),
(0x27D);

INSERT INTO case_folding (code) VALUES
(0x0049) /* LATIN CAPITAL LETTER I */,
(0x0069) /* LATIN SMALL LETTER I */,
(0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */,
(0x0131) /* LATIN SMALL LETTER DOTLESS I */
;

INSERT INTO case_folding (code) VALUES
(0x2C2F) /* GLAGOLITIC CAPITAL LETTER CAUDATE CHRIVI (Unicode-14.0) */,
(0x2C5F) /* GLAGOLITIC SMALL LETTER CAUDATE CHRIVI (Unicode-14.0) */,
(0xA7C0) /* LATIN CAPITAL LETTER OLD POLISH O (Unicode-14.0) */,
(0xA7C1) /* LATIN SMALL LETTER OLD POLISH O (Unicode-14.0) */;

UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
DROP TABLE case_folding;