
On 11.08.18 17:28, Heinrich Schuchardt wrote:
This patch provides a define to initialize a table that maps lower to capital letters for Unicode code point 0x0000 - 0xffff.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
MAINTAINERS | 1 + include/capitalization.h | 1909 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 1910 insertions(+) create mode 100644 include/capitalization.h
diff --git a/MAINTAINERS b/MAINTAINERS index a324139471..0a543309f2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -368,6 +368,7 @@ F: doc/DocBook/efi.tmpl F: doc/README.uefi F: doc/README.iscsi F: Documentation/efi.rst +F: include/capitalization.h F: include/efi* F: include/pe.h F: include/asm-generic/pe.h diff --git a/include/capitalization.h b/include/capitalization.h new file mode 100644 index 0000000000..50d5108f98 --- /dev/null +++ b/include/capitalization.h @@ -0,0 +1,1909 @@ +/* SPDX-License-Identifier: Unicode-DFS-2016 */ +/*
- Correspondence table for small and capital Unicode letters in the range of
- 0x0000 - 0xffff based on http://www.unicode.org/Public/UCA/11.0.0/allkeys.txt
- */
+struct capitalization_table {
- u16 upper;
- u16 lower;
+};
+#define UNICODE_CAPITALIZATION_TABLE { \
Ugh, that is a *lot* of data. How much does the binary size grow with the table compiled in?
Is there any slightly more sophisticated pattern in the table maybe that we could just express as code? Would that turn out smaller maybe?
Alex
- { 0x0531, /* ARMENIAN CAPITAL LETTER AYB */ \
0x0561, /* ARMENIAN SMALL LETTER AYB */ }, \
- { 0x0532, /* ARMENIAN CAPITAL LETTER BEN */ \
0x0562, /* ARMENIAN SMALL LETTER BEN */ }, \
- { 0x053E, /* ARMENIAN CAPITAL LETTER CA */ \
0x056E, /* ARMENIAN SMALL LETTER CA */ }, \
- { 0x0549, /* ARMENIAN CAPITAL LETTER CHA */ \
[...]