authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-05-30 19:32:14 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-05-30 19:32:14 -07:00
logaf185fe4e1496189fd90f6649f133ae171eadd96
tree471256aab8c0ba32b8a5bb90d7b7bfa0bcf39d89
parentd193577cf74c981e4774eb89bcb0d71f657639db

initial code commit


9 files changed, 539 insertions(+), 0 deletions(-)

.gitignore created+3
......@@ -0,0 +1,3 @@
1/zig-*
2/deps.zig
3/.zigmod
README.md created+64
......@@ -0,0 +1,64 @@
1# zig-unicode-ucd
2
3Zig bindings for the Unicode Character Database
4
5https://www.unicode.org/versions/latest/
6
7https://unicode.org/Public/UCD/latest/ucd/
8
9## API
10- [ ] `ArabicShaping`
11- [ ] `BidiBrackets`
12- [ ] `BidiCharacterTest`
13- [ ] `BidiMirroring`
14- [ ] `BidiTest`
15- [x] `Blocks`
16- [ ] `CJKRadicals`
17- [ ] `CaseFolding`
18- [ ] `CompositionExclusions`
19- [ ] `DerivedAge`
20- [ ] `DerivedCoreProperties`
21- [ ] `DerivedNormalizationProps`
22- [ ] `EastAsianWidth`
23- [ ] `EmojiSources`
24- [ ] `EquivalentUnifiedIdeograph`
25- [ ] `HangulSyllableType`
26- [ ] `Index`
27- [ ] `IndicPositionalCategory`
28- [ ] `IndicSyllabicCategory`
29- [ ] `Jamo`
30- [ ] `LineBreak`
31- [ ] `NameAliases`
32- [ ] `NamedSequences`
33- [ ] `NamedSequencesProv`
34- [ ] `NamesList`
35- [ ] `NormalizationCorrections`
36- [ ] `NormalizationTest`
37- [ ] `NushuSources`
38- [ ] `PropList`
39- [ ] `PropertyAliases`
40- [ ] `PropertyValueAliases`
41- [ ] `ScriptExtensions`
42- [ ] `Scripts`
43- [ ] `SpecialCasing`
44- [ ] `StandardizedVariants`
45- [ ] `TangutSources`
46- [ ] `USourceData`
47- [ ] `UnicodeData`
48- [ ] `VerticalOrientation`
49
50<!--
51[DIR] auxiliary/
52[DIR] emoji/
53[DIR] extracted/
54-->
55
56## Installation
57```
58zigmod aq add 1/nektro/unicode-ucd
59```
60
61## License
62Code here is MIT
63
64Source data files are https://www.unicode.org/license.html
build.zig created+34
......@@ -0,0 +1,34 @@
1const std = @import("std");
2const deps = @import("./deps.zig");
3
4pub fn build(b: *std.build.Builder) void {
5 const target = b.standardTargetOptions(.{});
6
7 const mode = b.standardReleaseOptions();
8
9 const step = b.option([]const u8, "step", "") orelse "run";
10
11 if (std.mem.eql(u8, step, "run")) {
12 addExeStep(b, target, mode, "zig-unicode-ucd", "src/main.zig", "Run the app");
13 }
14 if (std.mem.eql(u8, step, "generate")) {
15 addExeStep(b, target, mode, "generate", "generate.zig", "Generate the bindings");
16 }
17}
18
19fn addExeStep(b: *std.build.Builder, target: std.zig.CrossTarget, mode: std.builtin.Mode, name: []const u8, root_src: ?[]const u8, sdescription: []const u8) void {
20 const exe = b.addExecutable(name, root_src);
21 exe.setTarget(target);
22 exe.setBuildMode(mode);
23 deps.addAllTo(exe);
24 exe.install();
25
26 const cmd = exe.run();
27 cmd.step.dependOn(b.getInstallStep());
28 if (b.args) |args| {
29 cmd.addArgs(args);
30 }
31
32 const step = b.step("run", sdescription);
33 step.dependOn(&cmd.step);
34}
generate.zig created+42
......@@ -0,0 +1,42 @@
1const std = @import("std");
2
3const common = @import("scripts/_common.zig");
4
5pub fn main() !void {
6 try common.Main(struct {
7 pub const source_url = "https://unicode.org/Public/UCD/latest/ucd/Blocks.txt";
8
9 pub const dest_file = "src/blocks.zig";
10
11 pub const dest_header =
12 \\// This file is part of the Unicode Character Database
13 \\// See http://www.unicode.org/reports/tr44/ for more information.
14 \\//
15 \\
16 \\pub const Block = struct {
17 \\ from: u21,
18 \\ to: u21,
19 \\ name: []const u8,
20 \\};
21 \\
22 \\pub const blocks: []Block = &.{
23 \\
24 ;
25
26 pub const dest_footer =
27 \\};
28 \\
29 ;
30
31 pub fn exec(alloc: *std.mem.Allocator, line: []const u8, writer: anytype) !bool {
32 var it1 = std.mem.split(line, "; ");
33 var it2 = std.mem.split(it1.next().?, "..");
34 const from = it2.next().?;
35 const to = it2.next().?;
36 const name = it1.next().?;
37
38 try writer.print(" .{{ 0x{s}, 0x{s}, \"{s}\" }},\n", .{ from, to, name });
39 return true;
40 }
41 }).do();
42}
scripts/_common.zig created+55
......@@ -0,0 +1,55 @@
1const std = @import("std");
2const zfetch = @import("zfetch");
3const fmtValueLiteral = @import("fmt-valueliteral").fmtValueLiteral;
4const ansi = @import("ansi");
5
6pub fn Main(comptime T: type) type {
7 comptime std.debug.assert(@hasDecl(T, "source_url"));
8 comptime std.debug.assert(@hasDecl(T, "dest_file"));
9 comptime std.debug.assert(@hasDecl(T, "dest_header"));
10 comptime std.debug.assert(@hasDecl(T, "dest_footer"));
11 comptime std.debug.assert(@hasDecl(T, "exec"));
12 return struct {
13 pub fn do() !void {
14 var gpa = std.heap.GeneralPurposeAllocator(.{}){};
15 const alloc = &gpa.allocator;
16 const max_size = std.math.maxInt(usize);
17
18 //
19 std.log.info("{s}", .{T.dest_file});
20
21 const file = try std.fs.cwd().createFile(T.dest_file, .{});
22 defer file.close();
23 const w = file.writer();
24
25 try w.writeAll(T.dest_header);
26
27 const req = try zfetch.Request.init(alloc, T.source_url, null);
28 defer req.deinit();
29 try req.do(.GET, null, null);
30 const r = req.reader();
31
32 var line_num: usize = 1;
33 std.debug.print("\n", .{});
34 while (true) {
35 const line = r.readUntilDelimiterAlloc(alloc, '\n', max_size) catch |e| if (e == error.EndOfStream) break else return e;
36 if (line.len == 0) {
37 continue;
38 }
39 if (line[0] == '#') {
40 continue;
41 }
42
43 if (!(try T.exec(alloc, line, w))) {
44 break;
45 }
46
47 std.debug.print("{s}", .{comptime ansi.csi.CursorUp(1)});
48 std.debug.print("{s}", .{comptime ansi.csi.EraseInLine(0)});
49 std.debug.print("{d}\n", .{line_num});
50 line_num += 1;
51 }
52 try w.writeAll(T.dest_footer);
53 }
54 };
55}
src/blocks.zig created+320
......@@ -0,0 +1,320 @@
1// This file is part of the Unicode Character Database
2// See http://www.unicode.org/reports/tr44/ for more information.
3//
4
5pub const Block = struct {
6 from: u21,
7 to: u21,
8 name: []const u8,
9};
10
11pub const blocks: []Block = &.{
12 .{ 0x0000, 0x007F, "Basic Latin" },
13 .{ 0x0080, 0x00FF, "Latin-1 Supplement" },
14 .{ 0x0100, 0x017F, "Latin Extended-A" },
15 .{ 0x0180, 0x024F, "Latin Extended-B" },
16 .{ 0x0250, 0x02AF, "IPA Extensions" },
17 .{ 0x02B0, 0x02FF, "Spacing Modifier Letters" },
18 .{ 0x0300, 0x036F, "Combining Diacritical Marks" },
19 .{ 0x0370, 0x03FF, "Greek and Coptic" },
20 .{ 0x0400, 0x04FF, "Cyrillic" },
21 .{ 0x0500, 0x052F, "Cyrillic Supplement" },
22 .{ 0x0530, 0x058F, "Armenian" },
23 .{ 0x0590, 0x05FF, "Hebrew" },
24 .{ 0x0600, 0x06FF, "Arabic" },
25 .{ 0x0700, 0x074F, "Syriac" },
26 .{ 0x0750, 0x077F, "Arabic Supplement" },
27 .{ 0x0780, 0x07BF, "Thaana" },
28 .{ 0x07C0, 0x07FF, "NKo" },
29 .{ 0x0800, 0x083F, "Samaritan" },
30 .{ 0x0840, 0x085F, "Mandaic" },
31 .{ 0x0860, 0x086F, "Syriac Supplement" },
32 .{ 0x08A0, 0x08FF, "Arabic Extended-A" },
33 .{ 0x0900, 0x097F, "Devanagari" },
34 .{ 0x0980, 0x09FF, "Bengali" },
35 .{ 0x0A00, 0x0A7F, "Gurmukhi" },
36 .{ 0x0A80, 0x0AFF, "Gujarati" },
37 .{ 0x0B00, 0x0B7F, "Oriya" },
38 .{ 0x0B80, 0x0BFF, "Tamil" },
39 .{ 0x0C00, 0x0C7F, "Telugu" },
40 .{ 0x0C80, 0x0CFF, "Kannada" },
41 .{ 0x0D00, 0x0D7F, "Malayalam" },
42 .{ 0x0D80, 0x0DFF, "Sinhala" },
43 .{ 0x0E00, 0x0E7F, "Thai" },
44 .{ 0x0E80, 0x0EFF, "Lao" },
45 .{ 0x0F00, 0x0FFF, "Tibetan" },
46 .{ 0x1000, 0x109F, "Myanmar" },
47 .{ 0x10A0, 0x10FF, "Georgian" },
48 .{ 0x1100, 0x11FF, "Hangul Jamo" },
49 .{ 0x1200, 0x137F, "Ethiopic" },
50 .{ 0x1380, 0x139F, "Ethiopic Supplement" },
51 .{ 0x13A0, 0x13FF, "Cherokee" },
52 .{ 0x1400, 0x167F, "Unified Canadian Aboriginal Syllabics" },
53 .{ 0x1680, 0x169F, "Ogham" },
54 .{ 0x16A0, 0x16FF, "Runic" },
55 .{ 0x1700, 0x171F, "Tagalog" },
56 .{ 0x1720, 0x173F, "Hanunoo" },
57 .{ 0x1740, 0x175F, "Buhid" },
58 .{ 0x1760, 0x177F, "Tagbanwa" },
59 .{ 0x1780, 0x17FF, "Khmer" },
60 .{ 0x1800, 0x18AF, "Mongolian" },
61 .{ 0x18B0, 0x18FF, "Unified Canadian Aboriginal Syllabics Extended" },
62 .{ 0x1900, 0x194F, "Limbu" },
63 .{ 0x1950, 0x197F, "Tai Le" },
64 .{ 0x1980, 0x19DF, "New Tai Lue" },
65 .{ 0x19E0, 0x19FF, "Khmer Symbols" },
66 .{ 0x1A00, 0x1A1F, "Buginese" },
67 .{ 0x1A20, 0x1AAF, "Tai Tham" },
68 .{ 0x1AB0, 0x1AFF, "Combining Diacritical Marks Extended" },
69 .{ 0x1B00, 0x1B7F, "Balinese" },
70 .{ 0x1B80, 0x1BBF, "Sundanese" },
71 .{ 0x1BC0, 0x1BFF, "Batak" },
72 .{ 0x1C00, 0x1C4F, "Lepcha" },
73 .{ 0x1C50, 0x1C7F, "Ol Chiki" },
74 .{ 0x1C80, 0x1C8F, "Cyrillic Extended-C" },
75 .{ 0x1C90, 0x1CBF, "Georgian Extended" },
76 .{ 0x1CC0, 0x1CCF, "Sundanese Supplement" },
77 .{ 0x1CD0, 0x1CFF, "Vedic Extensions" },
78 .{ 0x1D00, 0x1D7F, "Phonetic Extensions" },
79 .{ 0x1D80, 0x1DBF, "Phonetic Extensions Supplement" },
80 .{ 0x1DC0, 0x1DFF, "Combining Diacritical Marks Supplement" },
81 .{ 0x1E00, 0x1EFF, "Latin Extended Additional" },
82 .{ 0x1F00, 0x1FFF, "Greek Extended" },
83 .{ 0x2000, 0x206F, "General Punctuation" },
84 .{ 0x2070, 0x209F, "Superscripts and Subscripts" },
85 .{ 0x20A0, 0x20CF, "Currency Symbols" },
86 .{ 0x20D0, 0x20FF, "Combining Diacritical Marks for Symbols" },
87 .{ 0x2100, 0x214F, "Letterlike Symbols" },
88 .{ 0x2150, 0x218F, "Number Forms" },
89 .{ 0x2190, 0x21FF, "Arrows" },
90 .{ 0x2200, 0x22FF, "Mathematical Operators" },
91 .{ 0x2300, 0x23FF, "Miscellaneous Technical" },
92 .{ 0x2400, 0x243F, "Control Pictures" },
93 .{ 0x2440, 0x245F, "Optical Character Recognition" },
94 .{ 0x2460, 0x24FF, "Enclosed Alphanumerics" },
95 .{ 0x2500, 0x257F, "Box Drawing" },
96 .{ 0x2580, 0x259F, "Block Elements" },
97 .{ 0x25A0, 0x25FF, "Geometric Shapes" },
98 .{ 0x2600, 0x26FF, "Miscellaneous Symbols" },
99 .{ 0x2700, 0x27BF, "Dingbats" },
100 .{ 0x27C0, 0x27EF, "Miscellaneous Mathematical Symbols-A" },
101 .{ 0x27F0, 0x27FF, "Supplemental Arrows-A" },
102 .{ 0x2800, 0x28FF, "Braille Patterns" },
103 .{ 0x2900, 0x297F, "Supplemental Arrows-B" },
104 .{ 0x2980, 0x29FF, "Miscellaneous Mathematical Symbols-B" },
105 .{ 0x2A00, 0x2AFF, "Supplemental Mathematical Operators" },
106 .{ 0x2B00, 0x2BFF, "Miscellaneous Symbols and Arrows" },
107 .{ 0x2C00, 0x2C5F, "Glagolitic" },
108 .{ 0x2C60, 0x2C7F, "Latin Extended-C" },
109 .{ 0x2C80, 0x2CFF, "Coptic" },
110 .{ 0x2D00, 0x2D2F, "Georgian Supplement" },
111 .{ 0x2D30, 0x2D7F, "Tifinagh" },
112 .{ 0x2D80, 0x2DDF, "Ethiopic Extended" },
113 .{ 0x2DE0, 0x2DFF, "Cyrillic Extended-A" },
114 .{ 0x2E00, 0x2E7F, "Supplemental Punctuation" },
115 .{ 0x2E80, 0x2EFF, "CJK Radicals Supplement" },
116 .{ 0x2F00, 0x2FDF, "Kangxi Radicals" },
117 .{ 0x2FF0, 0x2FFF, "Ideographic Description Characters" },
118 .{ 0x3000, 0x303F, "CJK Symbols and Punctuation" },
119 .{ 0x3040, 0x309F, "Hiragana" },
120 .{ 0x30A0, 0x30FF, "Katakana" },
121 .{ 0x3100, 0x312F, "Bopomofo" },
122 .{ 0x3130, 0x318F, "Hangul Compatibility Jamo" },
123 .{ 0x3190, 0x319F, "Kanbun" },
124 .{ 0x31A0, 0x31BF, "Bopomofo Extended" },
125 .{ 0x31C0, 0x31EF, "CJK Strokes" },
126 .{ 0x31F0, 0x31FF, "Katakana Phonetic Extensions" },
127 .{ 0x3200, 0x32FF, "Enclosed CJK Letters and Months" },
128 .{ 0x3300, 0x33FF, "CJK Compatibility" },
129 .{ 0x3400, 0x4DBF, "CJK Unified Ideographs Extension A" },
130 .{ 0x4DC0, 0x4DFF, "Yijing Hexagram Symbols" },
131 .{ 0x4E00, 0x9FFF, "CJK Unified Ideographs" },
132 .{ 0xA000, 0xA48F, "Yi Syllables" },
133 .{ 0xA490, 0xA4CF, "Yi Radicals" },
134 .{ 0xA4D0, 0xA4FF, "Lisu" },
135 .{ 0xA500, 0xA63F, "Vai" },
136 .{ 0xA640, 0xA69F, "Cyrillic Extended-B" },
137 .{ 0xA6A0, 0xA6FF, "Bamum" },
138 .{ 0xA700, 0xA71F, "Modifier Tone Letters" },
139 .{ 0xA720, 0xA7FF, "Latin Extended-D" },
140 .{ 0xA800, 0xA82F, "Syloti Nagri" },
141 .{ 0xA830, 0xA83F, "Common Indic Number Forms" },
142 .{ 0xA840, 0xA87F, "Phags-pa" },
143 .{ 0xA880, 0xA8DF, "Saurashtra" },
144 .{ 0xA8E0, 0xA8FF, "Devanagari Extended" },
145 .{ 0xA900, 0xA92F, "Kayah Li" },
146 .{ 0xA930, 0xA95F, "Rejang" },
147 .{ 0xA960, 0xA97F, "Hangul Jamo Extended-A" },
148 .{ 0xA980, 0xA9DF, "Javanese" },
149 .{ 0xA9E0, 0xA9FF, "Myanmar Extended-B" },
150 .{ 0xAA00, 0xAA5F, "Cham" },
151 .{ 0xAA60, 0xAA7F, "Myanmar Extended-A" },
152 .{ 0xAA80, 0xAADF, "Tai Viet" },
153 .{ 0xAAE0, 0xAAFF, "Meetei Mayek Extensions" },
154 .{ 0xAB00, 0xAB2F, "Ethiopic Extended-A" },
155 .{ 0xAB30, 0xAB6F, "Latin Extended-E" },
156 .{ 0xAB70, 0xABBF, "Cherokee Supplement" },
157 .{ 0xABC0, 0xABFF, "Meetei Mayek" },
158 .{ 0xAC00, 0xD7AF, "Hangul Syllables" },
159 .{ 0xD7B0, 0xD7FF, "Hangul Jamo Extended-B" },
160 .{ 0xD800, 0xDB7F, "High Surrogates" },
161 .{ 0xDB80, 0xDBFF, "High Private Use Surrogates" },
162 .{ 0xDC00, 0xDFFF, "Low Surrogates" },
163 .{ 0xE000, 0xF8FF, "Private Use Area" },
164 .{ 0xF900, 0xFAFF, "CJK Compatibility Ideographs" },
165 .{ 0xFB00, 0xFB4F, "Alphabetic Presentation Forms" },
166 .{ 0xFB50, 0xFDFF, "Arabic Presentation Forms-A" },
167 .{ 0xFE00, 0xFE0F, "Variation Selectors" },
168 .{ 0xFE10, 0xFE1F, "Vertical Forms" },
169 .{ 0xFE20, 0xFE2F, "Combining Half Marks" },
170 .{ 0xFE30, 0xFE4F, "CJK Compatibility Forms" },
171 .{ 0xFE50, 0xFE6F, "Small Form Variants" },
172 .{ 0xFE70, 0xFEFF, "Arabic Presentation Forms-B" },
173 .{ 0xFF00, 0xFFEF, "Halfwidth and Fullwidth Forms" },
174 .{ 0xFFF0, 0xFFFF, "Specials" },
175 .{ 0x10000, 0x1007F, "Linear B Syllabary" },
176 .{ 0x10080, 0x100FF, "Linear B Ideograms" },
177 .{ 0x10100, 0x1013F, "Aegean Numbers" },
178 .{ 0x10140, 0x1018F, "Ancient Greek Numbers" },
179 .{ 0x10190, 0x101CF, "Ancient Symbols" },
180 .{ 0x101D0, 0x101FF, "Phaistos Disc" },
181 .{ 0x10280, 0x1029F, "Lycian" },
182 .{ 0x102A0, 0x102DF, "Carian" },
183 .{ 0x102E0, 0x102FF, "Coptic Epact Numbers" },
184 .{ 0x10300, 0x1032F, "Old Italic" },
185 .{ 0x10330, 0x1034F, "Gothic" },
186 .{ 0x10350, 0x1037F, "Old Permic" },
187 .{ 0x10380, 0x1039F, "Ugaritic" },
188 .{ 0x103A0, 0x103DF, "Old Persian" },
189 .{ 0x10400, 0x1044F, "Deseret" },
190 .{ 0x10450, 0x1047F, "Shavian" },
191 .{ 0x10480, 0x104AF, "Osmanya" },
192 .{ 0x104B0, 0x104FF, "Osage" },
193 .{ 0x10500, 0x1052F, "Elbasan" },
194 .{ 0x10530, 0x1056F, "Caucasian Albanian" },
195 .{ 0x10600, 0x1077F, "Linear A" },
196 .{ 0x10800, 0x1083F, "Cypriot Syllabary" },
197 .{ 0x10840, 0x1085F, "Imperial Aramaic" },
198 .{ 0x10860, 0x1087F, "Palmyrene" },
199 .{ 0x10880, 0x108AF, "Nabataean" },
200 .{ 0x108E0, 0x108FF, "Hatran" },
201 .{ 0x10900, 0x1091F, "Phoenician" },
202 .{ 0x10920, 0x1093F, "Lydian" },
203 .{ 0x10980, 0x1099F, "Meroitic Hieroglyphs" },
204 .{ 0x109A0, 0x109FF, "Meroitic Cursive" },
205 .{ 0x10A00, 0x10A5F, "Kharoshthi" },
206 .{ 0x10A60, 0x10A7F, "Old South Arabian" },
207 .{ 0x10A80, 0x10A9F, "Old North Arabian" },
208 .{ 0x10AC0, 0x10AFF, "Manichaean" },
209 .{ 0x10B00, 0x10B3F, "Avestan" },
210 .{ 0x10B40, 0x10B5F, "Inscriptional Parthian" },
211 .{ 0x10B60, 0x10B7F, "Inscriptional Pahlavi" },
212 .{ 0x10B80, 0x10BAF, "Psalter Pahlavi" },
213 .{ 0x10C00, 0x10C4F, "Old Turkic" },
214 .{ 0x10C80, 0x10CFF, "Old Hungarian" },
215 .{ 0x10D00, 0x10D3F, "Hanifi Rohingya" },
216 .{ 0x10E60, 0x10E7F, "Rumi Numeral Symbols" },
217 .{ 0x10E80, 0x10EBF, "Yezidi" },
218 .{ 0x10F00, 0x10F2F, "Old Sogdian" },
219 .{ 0x10F30, 0x10F6F, "Sogdian" },
220 .{ 0x10FB0, 0x10FDF, "Chorasmian" },
221 .{ 0x10FE0, 0x10FFF, "Elymaic" },
222 .{ 0x11000, 0x1107F, "Brahmi" },
223 .{ 0x11080, 0x110CF, "Kaithi" },
224 .{ 0x110D0, 0x110FF, "Sora Sompeng" },
225 .{ 0x11100, 0x1114F, "Chakma" },
226 .{ 0x11150, 0x1117F, "Mahajani" },
227 .{ 0x11180, 0x111DF, "Sharada" },
228 .{ 0x111E0, 0x111FF, "Sinhala Archaic Numbers" },
229 .{ 0x11200, 0x1124F, "Khojki" },
230 .{ 0x11280, 0x112AF, "Multani" },
231 .{ 0x112B0, 0x112FF, "Khudawadi" },
232 .{ 0x11300, 0x1137F, "Grantha" },
233 .{ 0x11400, 0x1147F, "Newa" },
234 .{ 0x11480, 0x114DF, "Tirhuta" },
235 .{ 0x11580, 0x115FF, "Siddham" },
236 .{ 0x11600, 0x1165F, "Modi" },
237 .{ 0x11660, 0x1167F, "Mongolian Supplement" },
238 .{ 0x11680, 0x116CF, "Takri" },
239 .{ 0x11700, 0x1173F, "Ahom" },
240 .{ 0x11800, 0x1184F, "Dogra" },
241 .{ 0x118A0, 0x118FF, "Warang Citi" },
242 .{ 0x11900, 0x1195F, "Dives Akuru" },
243 .{ 0x119A0, 0x119FF, "Nandinagari" },
244 .{ 0x11A00, 0x11A4F, "Zanabazar Square" },
245 .{ 0x11A50, 0x11AAF, "Soyombo" },
246 .{ 0x11AC0, 0x11AFF, "Pau Cin Hau" },
247 .{ 0x11C00, 0x11C6F, "Bhaiksuki" },
248 .{ 0x11C70, 0x11CBF, "Marchen" },
249 .{ 0x11D00, 0x11D5F, "Masaram Gondi" },
250 .{ 0x11D60, 0x11DAF, "Gunjala Gondi" },
251 .{ 0x11EE0, 0x11EFF, "Makasar" },
252 .{ 0x11FB0, 0x11FBF, "Lisu Supplement" },
253 .{ 0x11FC0, 0x11FFF, "Tamil Supplement" },
254 .{ 0x12000, 0x123FF, "Cuneiform" },
255 .{ 0x12400, 0x1247F, "Cuneiform Numbers and Punctuation" },
256 .{ 0x12480, 0x1254F, "Early Dynastic Cuneiform" },
257 .{ 0x13000, 0x1342F, "Egyptian Hieroglyphs" },
258 .{ 0x13430, 0x1343F, "Egyptian Hieroglyph Format Controls" },
259 .{ 0x14400, 0x1467F, "Anatolian Hieroglyphs" },
260 .{ 0x16800, 0x16A3F, "Bamum Supplement" },
261 .{ 0x16A40, 0x16A6F, "Mro" },
262 .{ 0x16AD0, 0x16AFF, "Bassa Vah" },
263 .{ 0x16B00, 0x16B8F, "Pahawh Hmong" },
264 .{ 0x16E40, 0x16E9F, "Medefaidrin" },
265 .{ 0x16F00, 0x16F9F, "Miao" },
266 .{ 0x16FE0, 0x16FFF, "Ideographic Symbols and Punctuation" },
267 .{ 0x17000, 0x187FF, "Tangut" },
268 .{ 0x18800, 0x18AFF, "Tangut Components" },
269 .{ 0x18B00, 0x18CFF, "Khitan Small Script" },
270 .{ 0x18D00, 0x18D8F, "Tangut Supplement" },
271 .{ 0x1B000, 0x1B0FF, "Kana Supplement" },
272 .{ 0x1B100, 0x1B12F, "Kana Extended-A" },
273 .{ 0x1B130, 0x1B16F, "Small Kana Extension" },
274 .{ 0x1B170, 0x1B2FF, "Nushu" },
275 .{ 0x1BC00, 0x1BC9F, "Duployan" },
276 .{ 0x1BCA0, 0x1BCAF, "Shorthand Format Controls" },
277 .{ 0x1D000, 0x1D0FF, "Byzantine Musical Symbols" },
278 .{ 0x1D100, 0x1D1FF, "Musical Symbols" },
279 .{ 0x1D200, 0x1D24F, "Ancient Greek Musical Notation" },
280 .{ 0x1D2E0, 0x1D2FF, "Mayan Numerals" },
281 .{ 0x1D300, 0x1D35F, "Tai Xuan Jing Symbols" },
282 .{ 0x1D360, 0x1D37F, "Counting Rod Numerals" },
283 .{ 0x1D400, 0x1D7FF, "Mathematical Alphanumeric Symbols" },
284 .{ 0x1D800, 0x1DAAF, "Sutton SignWriting" },
285 .{ 0x1E000, 0x1E02F, "Glagolitic Supplement" },
286 .{ 0x1E100, 0x1E14F, "Nyiakeng Puachue Hmong" },
287 .{ 0x1E2C0, 0x1E2FF, "Wancho" },
288 .{ 0x1E800, 0x1E8DF, "Mende Kikakui" },
289 .{ 0x1E900, 0x1E95F, "Adlam" },
290 .{ 0x1EC70, 0x1ECBF, "Indic Siyaq Numbers" },
291 .{ 0x1ED00, 0x1ED4F, "Ottoman Siyaq Numbers" },
292 .{ 0x1EE00, 0x1EEFF, "Arabic Mathematical Alphabetic Symbols" },
293 .{ 0x1F000, 0x1F02F, "Mahjong Tiles" },
294 .{ 0x1F030, 0x1F09F, "Domino Tiles" },
295 .{ 0x1F0A0, 0x1F0FF, "Playing Cards" },
296 .{ 0x1F100, 0x1F1FF, "Enclosed Alphanumeric Supplement" },
297 .{ 0x1F200, 0x1F2FF, "Enclosed Ideographic Supplement" },
298 .{ 0x1F300, 0x1F5FF, "Miscellaneous Symbols and Pictographs" },
299 .{ 0x1F600, 0x1F64F, "Emoticons" },
300 .{ 0x1F650, 0x1F67F, "Ornamental Dingbats" },
301 .{ 0x1F680, 0x1F6FF, "Transport and Map Symbols" },
302 .{ 0x1F700, 0x1F77F, "Alchemical Symbols" },
303 .{ 0x1F780, 0x1F7FF, "Geometric Shapes Extended" },
304 .{ 0x1F800, 0x1F8FF, "Supplemental Arrows-C" },
305 .{ 0x1F900, 0x1F9FF, "Supplemental Symbols and Pictographs" },
306 .{ 0x1FA00, 0x1FA6F, "Chess Symbols" },
307 .{ 0x1FA70, 0x1FAFF, "Symbols and Pictographs Extended-A" },
308 .{ 0x1FB00, 0x1FBFF, "Symbols for Legacy Computing" },
309 .{ 0x20000, 0x2A6DF, "CJK Unified Ideographs Extension B" },
310 .{ 0x2A700, 0x2B73F, "CJK Unified Ideographs Extension C" },
311 .{ 0x2B740, 0x2B81F, "CJK Unified Ideographs Extension D" },
312 .{ 0x2B820, 0x2CEAF, "CJK Unified Ideographs Extension E" },
313 .{ 0x2CEB0, 0x2EBEF, "CJK Unified Ideographs Extension F" },
314 .{ 0x2F800, 0x2FA1F, "CJK Compatibility Ideographs Supplement" },
315 .{ 0x30000, 0x3134F, "CJK Unified Ideographs Extension G" },
316 .{ 0xE0000, 0xE007F, "Tags" },
317 .{ 0xE0100, 0xE01EF, "Variation Selectors Supplement" },
318 .{ 0xF0000, 0xFFFFF, "Supplementary Private Use Area-A" },
319 .{ 0x100000, 0x10FFFF, "Supplementary Private Use Area-B" },
320};
src/lib.zig created+1
......@@ -0,0 +1 @@
1pub const blocks = @import("./blocks.zig");
src/main.zig created+11
......@@ -0,0 +1,11 @@
1const std = @import("std");
2
3const ucd = @import("unicode-ucd");
4
5pub fn main() !void {
6 std.log.info("All your codebase are belong to us.", .{});
7
8 for (ucd.blocks.blocks) |b| {
9 std.debug.print("{}\n", .{b});
10 }
11}
zig.mod created+9
......@@ -0,0 +1,9 @@
1id: iws1u5qg29z5f3k0r4ckm02k5zhy1risxzy8c9pnlqueemcw
2name: unicode-ucd
3main: src/lib.zig
4license: MIT
5description: Zig bindings for the Unicode Character Database
6dev_dependencies:
7 - src: git https://github.com/truemedian/zfetch
8 - src: git https://github.com/nektro/zig-ansi
9 - src: git https://github.com/nektro/zig-fmt-valueliteral