Unicode case mapping tables and functions.
authorJeff Davis <jdavis@postgresql.org>
Thu, 7 Mar 2024 19:15:06 +0000 (11:15 -0800)
committerJeff Davis <jdavis@postgresql.org>
Thu, 7 Mar 2024 19:15:06 +0000 (11:15 -0800)
commit5c40364dd6d9c6a260c8965dffe2e066642d6f79
tree229ba6adf17935fe7f54f6cca3c3856267302d15
parent6d470211e54f7a617783b99b27c9d8056a890a57
Unicode case mapping tables and functions.

Implements Unicode simple case mapping, in which all code points map
to exactly one other code point unconditionally.

These tables are generated from UnicodeData.txt, which is already
being used by other infrastructure in src/common/unicode. The tables
are checked into the source tree, so they only need to be regenerated
when we update the Unicode version.

In preparation for the builtin collation provider, and possibly useful
for other callers.

Discussion: https://postgr.es/m/ff4c2f2f9c8fc7ca27c1c24ae37ecaeaeaff6b53.camel%40j-davis.com
Reviewed-by: Peter Eisentraut, Daniel Verite, Jeremy Schneider
src/common/Makefile
src/common/meson.build
src/common/unicode/Makefile
src/common/unicode/case_test.c [new file with mode: 0644]
src/common/unicode/generate-unicode_case_table.pl [new file with mode: 0644]
src/common/unicode/meson.build
src/common/unicode_case.c [new file with mode: 0644]
src/common/wchar.c
src/include/common/unicode_case.h [new file with mode: 0644]
src/include/common/unicode_case_table.h [new file with mode: 0644]
src/include/mb/pg_wchar.h