• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..08-Nov-2021-

.gitignoreH A D08-Nov-2021153 86

MakefileH A D08-Nov-20211.4 KiB5423

READMEH A D08-Nov-20211.3 KiB3625

generate-norm_test_table.plH A D08-Nov-20212.6 KiB10367

generate-unicode_norm_table.plH A D08-Nov-20216.5 KiB232153

norm_test.cH A D08-Nov-20211.5 KiB8158

README

1This directory contains tools to generate the tables in
2src/include/common/unicode_norm.h, used for Unicode normalization. The
3generated .h file is included in the source tree, so these are normally not
4needed to build PostgreSQL, only if you need to re-generate the .h file
5from the Unicode data files for some reason, e.g. to update to a new version
6of Unicode.
7
8Generating unicode_norm_table.h
9-------------------------------
10
111. Download the Unicode data file, UnicodeData.txt, from the Unicode
12consortium and place it to the current directory. Run the perl script
13"norm_test_generate.pl", to process it, and to generate the
14"unicode_norm_table.h" file. The Makefile contains a rule to download the
15data files if they don't exist.
16
17    make unicode_norm_table.h
18
192. Inspect the resulting header file. Once you're happy with it, copy it to
20the right location.
21
22    cp unicode_norm_table.h ../../../src/include/common/
23
24
25
26Tests
27-----
28
29The Unicode consortium publishes a comprehensive test suite for the
30normalization algorithm, in a file called NormalizationTest.txt. This
31directory also contains a perl script and some C code, to run our
32normalization code with all the test strings in NormalizationTest.txt.
33To download NormalizationTest.txt and run the tests:
34
35    make normalization-check
36