Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions scripts/gen_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ def items():
codePointPrev = codePoint
i += 1

print("const std::unordered_map<char32_t, const char32_t*> _simple_case_mappings = {")
for cp, upper, lower, title in items():
print('{ 0x%08X, U"\\U%08X\\U%08X\\U%08X" },' % (cp, upper, lower, title))
print("constexpr char32_t _simple_case_mappings[][4] = {")
for cp, upper, lower, title in sorted(items()):
print('{ 0x%08X, 0x%08X, 0x%08X, 0x%08X },' % (cp, upper, lower, title))
print("};")

#------------------------------------------------------------------------------
Expand Down Expand Up @@ -804,10 +804,10 @@ def items():
else:
exclusions.add(first)

print("const std::unordered_map<std::u32string, char32_t> _normalization_composition = {")
print("const std::unordered_map<uint64_t, char32_t> _normalization_composition = {")
for cp, codes in items():
if not cp in exclusions:
print('{ U"\\U%08X\\U%08X", 0x%08X },' % (codes[0], codes[1], cp))
print("{ UINT64_C(0x%08X'%08X), 0x%08X }," % (codes[0], codes[1], cp))
print("};")

#------------------------------------------------------------------------------
Expand Down
Loading
Loading