xref: /haiku/src/apps/charactermap/UnicodeBlocks.cpp (revision 03187b607b2b5eec7ee059f1ead09bdba14991fb)
1 /*
2  * Copyright 2009, Axel Dörfler, axeld@pinc-software.de.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include "UnicodeBlocks.h"
8 
9 
10 const unicode_block kNoBlock;
11 
12 const struct unicode_block_entry kUnicodeBlocks[] = {
13 	{"Basic Latin", 0x0000, 0x007f, false, B_BASIC_LATIN_BLOCK},
14 	{"Latin-1 Supplement", 0x0080, 0x00ff, false, B_LATIN1_SUPPLEMENT_BLOCK},
15 	{"Latin Extended A", 0x0100, 0x017f, false, B_LATIN_EXTENDED_A_BLOCK},
16 	{"Latin Extended B", 0x0180, 0x024f, false, B_LATIN_EXTENDED_B_BLOCK},
17 	{"IPA Extensions", 0x0250, 0x02af, false, B_IPA_EXTENSIONS_BLOCK},
18 	{"Spacing Modifier Letters", 0x02b0, 0x02ff, false,
19 		B_SPACING_MODIFIER_LETTERS_BLOCK},
20 	{"Combining Diacritical Marks", 0x0300, 0x036f, false,
21 		B_COMBINING_DIACRITICAL_MARKS_BLOCK},
22 	{"Greek and Coptic", 0x0370, 0x03ff, false,
23 		B_BASIC_GREEK_BLOCK | B_GREEK_SYMBOLS_AND_COPTIC_BLOCK},
24 	{"Cyrillic", 0x0400, 0x04ff, false, B_CYRILLIC_BLOCK},
25 	{"Cyrillic Supplement", 0x0500, 0x052f, false, B_CYRILLIC_BLOCK},
26 	{"Armenian", 0x0530, 0x058f, false, B_ARMENIAN_BLOCK},
27 	{"Hebrew", 0x0590, 0x05ff, false,
28 		B_BASIC_HEBREW_BLOCK | B_HEBREW_EXTENDED_BLOCK},
29 	{"Arabic", 0x0600, 0x06ff, false,
30 		B_BASIC_ARABIC_BLOCK | B_ARABIC_EXTENDED_BLOCK},
31 	{"Syriac", 0x0700, 0x074f, false, kNoBlock},
32 	{"Arabic Supplement", 0x0750, 0x077f, false, kNoBlock},
33 	{"Thaana", 0x0780, 0x07bf, false, kNoBlock},
34 	{"N'Ko", 0x07c0, 0x07ff, false, kNoBlock},
35 	{"Devanagari", 0x0900, 0x097f, false, B_DEVANAGARI_BLOCK},
36 	{"Bengali", 0x0980, 0x09ff, false, B_BENGALI_BLOCK},
37 	{"Gurmukhi", 0x0a00, 0x0a7f, false, B_GURMUKHI_BLOCK},
38 	{"Gujarati", 0x0a80, 0x0aff, false, B_GUJARATI_BLOCK},
39 	{"Oriya", 0x0b00, 0x0b7f, false, B_ORIYA_BLOCK},
40 	{"Tamil", 0x0b80, 0x0bff, false, B_TAMIL_BLOCK},
41 	{"Telugu", 0x0c00, 0x0c7f, false, B_TELUGU_BLOCK},
42 	{"Kannada", 0x0c80, 0x0cff, false, B_KANNADA_BLOCK},
43 	{"Malayalam", 0x0d00, 0x0d7f, false, B_MALAYALAM_BLOCK},
44 	{"Sinhala", 0x0d80, 0x0dff, false, kNoBlock},
45 	{"Thai", 0x0e00, 0x0e7f, false, B_THAI_BLOCK},
46 	{"Lao", 0x0e80, 0x0eff, false, B_LAO_BLOCK},
47 	{"Tibetan", 0x0f00, 0x0fff, false, kNoBlock},
48 	{"Myanmar", 0x1000, 0x109f, false, kNoBlock},
49 	{"Georgian", 0x10a0, 0x10ff, false, B_BASIC_GEORGIAN_BLOCK},
50 	{"Hangul Jamo", 0x1100, 0x11ff, false, kNoBlock},
51 // TODO!
52 	{"Ethiopic", 0x1200, 0x137f, false, kNoBlock},
53 	{"Ethiopic Supplement", 0x1380, 0x139f, false, kNoBlock},
54 	{"Cherokee", 0x13a0, 0x13ff, false, kNoBlock},
55 	{"Unified Canadian Aboriginal Syllabics", 0x1400, 0x167f, false, kNoBlock},
56 	{"Ogham", 0x1680, 0x169f, false, kNoBlock},
57 	{"Runic", 0x16a0, 0x16ff, false, kNoBlock},
58 	{"Tagalog", 0x1700, 0x171f, false, kNoBlock},
59 	{"Hanunoo", 0x1720, 0x173f, false, kNoBlock},
60 	{"Buhid", 0x1740, 0x175f, false, kNoBlock},
61 	{"Tagbanwa", 0x1760, 0x177f, false, kNoBlock},
62 	{"Khmer", 0x1780, 0x17ff, false, kNoBlock},
63 	{"Mongolian", 0x1800, 0x18af, false, kNoBlock},
64 	{"Limbu", 0x1900, 0x194f, false, kNoBlock},
65 	{"Tai Le", 0x1950, 0x197f, false, kNoBlock},
66 	{"New Tai Lue", 0x1980, 0x19df, false, kNoBlock},
67 	{"Khmer Symbols", 0x19e0, 0x19ff, false, kNoBlock},
68 	{"Buginese", 0x1a00, 0x1a1f, false, kNoBlock},
69 	{"Balinese", 0x1b00, 0x1b7f, false, kNoBlock},
70 	{"Sundanese", 0x1b80, 0x1bbf, false, kNoBlock},
71 	{"Lepcha", 0x1c00, 0x1c4f, false, kNoBlock},
72 	{"Ol Chiki", 0x1c50, 0x1c7f, false, kNoBlock},
73 	{"Phonetic Extensions", 0x1d00, 0x1d7f, false, kNoBlock},
74 	{"Phonetic Extensions Supplement", 0x1d80, 0x1dbf, false, kNoBlock},
75 	{"Combining Diacritical Marks Supplement", 0x1dc0, 0x1dff, false, kNoBlock},
76 	{"Latin Extended Additional", 0x1e00, 0x1eff, false, kNoBlock},
77 	{"Greek Extended", 0x1f00, 0x1fff, false, kNoBlock},
78 	{"General Punctuation", 0x2000, 0x206f, false, kNoBlock},
79 	{"Superscripts and Subscripts", 0x2070, 0x209f, false, kNoBlock},
80 	{"Currency Symbols", 0x20a0, 0x20cf, false, kNoBlock},
81 	{"Combining Diacritical Marks for Symbols", 0x20d0, 0x20ff, false,
82 		kNoBlock},
83 	{"Letterlike Symbols", 0x2100, 0x214f, false, kNoBlock},
84 	{"Number Forms", 0x2150, 0x218f, false, kNoBlock},
85 	{"Arrows", 0x2190, 0x21ff, false, kNoBlock},
86 	{"Mathematical Operators", 0x2200, 0x22ff, false, kNoBlock},
87 	{"Miscellaneous Technical", 0x2300, 0x23ff, false, kNoBlock},
88 	{"Control Pictures", 0x2400, 0x243f, false, kNoBlock},
89 	{"Optical Character Recognition", 0x2440, 0x245f, false, kNoBlock},
90 	{"Enclosed Alphanumerics", 0x2460, 0x24ff, false, kNoBlock},
91 	{"Box Drawing", 0x2500, 0x257f, false, kNoBlock},
92 	{"Block Elements", 0x2580, 0x259f, false, kNoBlock},
93 	{"Geometric Shapes", 0x25a0, 0x25ff, false, kNoBlock},
94 	{"Miscellaneous Symbols", 0x2600, 0x26ff, false, kNoBlock},
95 	{"Dingbats", 0x2700, 0x27bf, false, kNoBlock},
96 	{"Miscellaneous Mathematical Symbols A", 0x27c0, 0x27ef, false, kNoBlock},
97 	{"Supplemental Arrows A", 0x27f0, 0x27ff, false, kNoBlock},
98 	{"Braille Patterns", 0x2800, 0x28ff, false, kNoBlock},
99 	{"Supplemental Arrows B", 0x2900, 0x297f, false, kNoBlock},
100 	{"Miscellaneous Mathematical Symbols B", 0x2980, 0x29ff, false, kNoBlock},
101 	{"Supplemental Mathematical Operators", 0x2a00, 0x2aff, false, kNoBlock},
102 	{"Miscellaneous Symbols And Arrows", 0x2b00, 0x2bff, false, kNoBlock},
103 	{"Glagotic", 0x2c00, 0x2c5f, false, kNoBlock},
104 	{"Latin Extended C", 0x2c60, 0x2c7f, false, kNoBlock},
105 	{"Coptic", 0x2c80, 0x2cff, false, kNoBlock},
106 	{"Georgian Supplement", 0x2d00, 0x2d2f, false, kNoBlock},
107 	{"Tifinagh", 0x2d30, 0x2d7f, false, kNoBlock},
108 	{"Ethiopic Extended", 0x2d80, 0x2ddf, false, kNoBlock},
109 	{"Cyrillic Extended A", 0x2de0, 0x2dff, false, kNoBlock},
110 	{"Supplement Punctuation", 0x2e00, 0x2e7f, false, kNoBlock},
111 	{"CJK Radicals Supplement", 0x2e80, 0x2eff, false, kNoBlock},
112 	{"Kangxi Radicals", 0x2f00, 0x2fdf, false, kNoBlock},
113 	{"Ideographic Description Characters", 0x2ff0, 0x2fff, false, kNoBlock},
114 	{"CJK Symbols and Punctuation", 0x3000, 0x303f, false, kNoBlock},
115 	{"Hiragana", 0x3040, 0x309f, false, kNoBlock},
116 	{"Katakana", 0x30a0, 0x30ff, false, kNoBlock},
117 	{"Bopomofo", 0x3100, 0x312f, false, kNoBlock},
118 	{"Hangul Compatibility Jamo", 0x3130, 0x318f, false, kNoBlock},
119 	{"Kanbun", 0x3190, 0x319f, false, kNoBlock},
120 	{"Bopomofo Extended", 0x31a0, 0x31bf, false, kNoBlock},
121 	{"CJK Strokes", 0x31c0, 0x31ef, false, kNoBlock},
122 	{"Katakana Phonetic Extensions", 0x31f0, 0x31ff, false, kNoBlock},
123 	{"Enclosed CJK Letters and Months", 0x3200, 0x32ff, false, kNoBlock},
124 	{"CJK Compatibility", 0x3300, 0x33ff, false, kNoBlock},
125 	{"CJK Unified Ideographs Extension A", 0x3400, 0x4dbf, false, kNoBlock},
126 	{"Yijing Hexagram Symbols", 0x4dc0, 0x4dff, false, kNoBlock},
127 	{"CJK Unified Ideographs", 0x4e00, 0x9fff, false, kNoBlock},
128 	{"Yi Syllables", 0xa000, 0xa48f, false, kNoBlock},
129 	{"Yi Radicals", 0xa490, 0xa4cf, false, kNoBlock},
130 	{"Vai", 0xa500, 0xa63f, false, kNoBlock},
131 	{"Cyrillic Extended B", 0xa640, 0xa69f, false, kNoBlock},
132 	{"Modifier Tone Letters", 0xa700, 0xa71f, false, kNoBlock},
133 	{"Latin Extended D", 0xa720, 0xa7ff, false, kNoBlock},
134 	{"Syloti Nagri", 0xa800, 0xa82f, false, kNoBlock},
135 	{"Phags-pa", 0xa840, 0xa87f, false, kNoBlock},
136 	{"Saurashtra", 0xa880, 0xa8df, false, kNoBlock},
137 	{"Kayah Li", 0xa900, 0xa92f, false, kNoBlock},
138 	{"Rejang", 0xa930, 0xa95f, false, kNoBlock},
139 	{"Cham", 0xaa00, 0xaa5f, false, kNoBlock},
140 	{"Hangul Syllables", 0xac00, 0xd7af, false, kNoBlock},
141 //	{"High Surrogates", 0xd800, 0xdb7f, false, kNoBlock},
142 //	{"High Private Use Surrogates", 0xdb80, 0xdbff, false, kNoBlock},
143 //	{"Low Surrogates", 0xdc00, 0xdfff, false, kNoBlock},
144 	{"Private Use Area", 0xe000, 0xf8ff, true, kNoBlock},
145 	{"CJK Compatibility Ideographs", 0xf900, 0xfaff, false, kNoBlock},
146 	{"Alphabetic Presentation Forms", 0xfb00, 0xfb4f, false, kNoBlock},
147 	{"Arabic Presentation Forms A", 0xfb50, 0xfdff, false, kNoBlock},
148 	{"Variation Selectors", 0xfe00, 0xfe0f, false, kNoBlock},
149 	{"Vertical Forms", 0xfe10, 0xfe1f, false, kNoBlock},
150 	{"Combining Half Marks", 0xfe20, 0xfe2f, false, kNoBlock},
151 	{"CJK Compatibility Forms", 0xfe30, 0xfe4f, false, kNoBlock},
152 	{"Small Form Variants", 0xfe50, 0xfe6f, false, kNoBlock},
153 	{"Arabic Presentation Forms B", 0xfe70, 0xfeff, false, kNoBlock},
154 	{"Halfwidth and Fullwidth Forms", 0xff00, 0xffef, false, kNoBlock},
155 	{"Specials", 0xfff0, 0xffff, false, kNoBlock},
156 	{"Linear B Syllabary", 0x010000, 0x01007f, false, kNoBlock},
157 	{"Linear B Ideograms", 0x010080, 0x0100ff, false, kNoBlock},
158 	{"Aegean Numbers", 0x010100, 0x01013f, false, kNoBlock},
159 	{"Ancient Greek Numbers", 0x010140, 0x01018f, false, kNoBlock},
160 	{"Ancient Symbols", 0x010190, 0x0101cf, false, kNoBlock},
161 	{"Phaistos Disc", 0x0101d0, 0x0101ff, false, kNoBlock},
162 	{"Lycian", 0x010280, 0x01029f, false, kNoBlock},
163 	{"Carian", 0x0102a0, 0x0102df, false, kNoBlock},
164 	{"Old Italic", 0x010300, 0x01032f, false, kNoBlock},
165 	{"Gothic", 0x010330, 0x01034f, false, kNoBlock},
166 	{"Ugaritic", 0x010380, 0x01039f, false, kNoBlock},
167 	{"Old Persian", 0x0103a0, 0x0103df, false, kNoBlock},
168 	{"Deseret", 0x010400, 0x01044f, false, kNoBlock},
169 	{"Shavian", 0x010450, 0x01047f, false, kNoBlock},
170 	{"Osmanya", 0x010480, 0x0104af, false, kNoBlock},
171 	{"Cypriot Syllabary", 0x010800, 0x01083f, false, kNoBlock},
172 	{"Phoenician", 0x010900, 0x01091f, false, kNoBlock},
173 	{"Lydian", 0x010920, 0x01093f, false, kNoBlock},
174 	{"Kharoshthi", 0x010a00, 0x010a5f, false, kNoBlock},
175 	{"Cuneiform", 0x012000, 0x0123ff, false, kNoBlock},
176 	{"Cuneiform Numbers and Punctuation", 0x012400, 0x01247f, false, kNoBlock},
177 	{"Byzantine Musical Symbols", 0x01d000, 0x01d0ff, false, kNoBlock},
178 	{"Muscial Symbols", 0x01d100, 0x01d1ff, false, kNoBlock},
179 	{"Ancient Greek Musical Notation", 0x01d200, 0x01d24f, false, kNoBlock},
180 	{"Tai Xuan Jing Symbols", 0x01d300, 0x01d35f, false, kNoBlock},
181 	{"Counting Rod Numerals", 0x01d360, 0x01d37f, false, kNoBlock},
182 	{"Mathematical Alphanumeric Symbols", 0x01d400, 0x01d7ff, false, kNoBlock},
183 	{"Mahjong Tiles", 0x01f000, 0x01f02f, false, kNoBlock},
184 	{"Domino Tiles", 0x01f030, 0x01f09f, false, kNoBlock},
185 	{"CJK Unified Ideographs Extension B", 0x020000, 0x02a6df, false, kNoBlock},
186 	{"CJK Compatibility Ideographs Supplement", 0x02f800, 0x02fa1f, false,
187 		kNoBlock},
188 	{"Tags", 0x0e0000, 0x0e007f, false, kNoBlock},
189 	{"Variation Selectors Supplement", 0x0e0100, 0x0e01ef, false, kNoBlock},
190 	{"Supplementary Private Use Area A", 0x0f0000, 0x0fffff, true, kNoBlock},
191 	{"Supplementary Private Use Area B", 0x100000, 0x10ffff, true, kNoBlock},
192 };
193 
194 const uint32 kNumUnicodeBlocks
195 	= sizeof(kUnicodeBlocks) / sizeof(kUnicodeBlocks[0]);
196