1b0452872SAxel Dörfler/*
2b0452872SAxel Dörfler * Copyright 2009, Axel D��rfler, axeld@pinc-software.de.
3b0452872SAxel Dörfler * Distributed under the terms of the MIT License.
4b0452872SAxel Dörfler */
5b0452872SAxel Dörfler
6b0452872SAxel Dörfler
7b0452872SAxel Dörfler#include "UnicodeBlocks.h"
8b0452872SAxel Dörfler
97c2ffab8SAdrien Destugues#include <Catalog.h>
107c2ffab8SAdrien Destugues
11546208a5SOliver Tappe#undef B_TRANSLATION_CONTEXT
12546208a5SOliver Tappe#define B_TRANSLATION_CONTEXT "UnicodeBlocks"
13b0452872SAxel Dörfler
14b0452872SAxel Dörflerconst unicode_block kNoBlock;
15b0452872SAxel Dörfler
16b0452872SAxel Dörflerconst struct unicode_block_entry kUnicodeBlocks[] = {
177c2ffab8SAdrien Destugues	{B_TRANSLATE("Basic Latin"), 0x0000, 0x007f, false, B_BASIC_LATIN_BLOCK},
187c2ffab8SAdrien Destugues	{B_TRANSLATE("Latin-1 supplement"), 0x0080, 0x00ff, false,
192824c5d3SAdrien Destugues		B_LATIN1_SUPPLEMENT_BLOCK},
207c2ffab8SAdrien Destugues	{B_TRANSLATE("Latin extended A"), 0x0100, 0x017f, false,
217c2ffab8SAdrien Destugues		B_LATIN_EXTENDED_A_BLOCK},
227c2ffab8SAdrien Destugues	{B_TRANSLATE("Latin extended B"), 0x0180, 0x024f, false,
237c2ffab8SAdrien Destugues		B_LATIN_EXTENDED_B_BLOCK},
247c2ffab8SAdrien Destugues	{B_TRANSLATE("IPA extensions"), 0x0250, 0x02af, false,
257c2ffab8SAdrien Destugues		B_IPA_EXTENSIONS_BLOCK},
267c2ffab8SAdrien Destugues	{B_TRANSLATE("Spacing modifier letters"), 0x02b0, 0x02ff, false,
27b0452872SAxel Dörfler		B_SPACING_MODIFIER_LETTERS_BLOCK},
287c2ffab8SAdrien Destugues	{B_TRANSLATE("Combining diacritical marks"), 0x0300, 0x036f, false,
29b0452872SAxel Dörfler		B_COMBINING_DIACRITICAL_MARKS_BLOCK},
307c2ffab8SAdrien Destugues	{B_TRANSLATE("Greek and Coptic"), 0x0370, 0x03ff, false,
31b0452872SAxel Dörfler		B_BASIC_GREEK_BLOCK | B_GREEK_SYMBOLS_AND_COPTIC_BLOCK},
327c2ffab8SAdrien Destugues	{B_TRANSLATE("Cyrillic"), 0x0400, 0x04ff, false, B_CYRILLIC_BLOCK},
337c2ffab8SAdrien Destugues	{B_TRANSLATE("Cyrillic supplement"), 0x0500, 0x052f, false,
342824c5d3SAdrien Destugues		B_CYRILLIC_BLOCK},
357c2ffab8SAdrien Destugues	{B_TRANSLATE("Armenian"), 0x0530, 0x058f, false, B_ARMENIAN_BLOCK},
367c2ffab8SAdrien Destugues	{B_TRANSLATE("Hebrew"), 0x0590, 0x05ff, false,
37b0452872SAxel Dörfler		B_BASIC_HEBREW_BLOCK | B_HEBREW_EXTENDED_BLOCK},
387c2ffab8SAdrien Destugues	{B_TRANSLATE("Arabic"), 0x0600, 0x06ff, false,
39b0452872SAxel Dörfler		B_BASIC_ARABIC_BLOCK | B_ARABIC_EXTENDED_BLOCK},
407c2ffab8SAdrien Destugues	{B_TRANSLATE("Syriac"), 0x0700, 0x074f, false, kNoBlock},
417c2ffab8SAdrien Destugues	{B_TRANSLATE("Arabic supplement"), 0x0750, 0x077f, false, kNoBlock},
427c2ffab8SAdrien Destugues	{B_TRANSLATE("Thaana"), 0x0780, 0x07bf, false, kNoBlock},
437c2ffab8SAdrien Destugues	{B_TRANSLATE("N'Ko"), 0x07c0, 0x07ff, false, kNoBlock},
447c2ffab8SAdrien Destugues	{B_TRANSLATE("Devanagari"), 0x0900, 0x097f, false, B_DEVANAGARI_BLOCK},
457c2ffab8SAdrien Destugues	{B_TRANSLATE("Bengali"), 0x0980, 0x09ff, false, B_BENGALI_BLOCK},
467c2ffab8SAdrien Destugues	{B_TRANSLATE("Gurmukhi"), 0x0a00, 0x0a7f, false, B_GURMUKHI_BLOCK},
477c2ffab8SAdrien Destugues	{B_TRANSLATE("Gujarati"), 0x0a80, 0x0aff, false, B_GUJARATI_BLOCK},
487c2ffab8SAdrien Destugues	{B_TRANSLATE("Oriya"), 0x0b00, 0x0b7f, false, B_ORIYA_BLOCK},
497c2ffab8SAdrien Destugues	{B_TRANSLATE("Tamil"), 0x0b80, 0x0bff, false, B_TAMIL_BLOCK},
507c2ffab8SAdrien Destugues	{B_TRANSLATE("Telugu"), 0x0c00, 0x0c7f, false, B_TELUGU_BLOCK},
517c2ffab8SAdrien Destugues	{B_TRANSLATE("Kannada"), 0x0c80, 0x0cff, false, B_KANNADA_BLOCK},
527c2ffab8SAdrien Destugues	{B_TRANSLATE("Malayalam"), 0x0d00, 0x0d7f, false, B_MALAYALAM_BLOCK},
537c2ffab8SAdrien Destugues	{B_TRANSLATE("Sinhala"), 0x0d80, 0x0dff, false, kNoBlock},
547c2ffab8SAdrien Destugues	{B_TRANSLATE("Thai"), 0x0e00, 0x0e7f, false, B_THAI_BLOCK},
557c2ffab8SAdrien Destugues	{B_TRANSLATE("Lao"), 0x0e80, 0x0eff, false, B_LAO_BLOCK},
567c2ffab8SAdrien Destugues	{B_TRANSLATE("Tibetan"), 0x0f00, 0x0fff, false, kNoBlock},
577c2ffab8SAdrien Destugues	{B_TRANSLATE("Myanmar"), 0x1000, 0x109f, false, kNoBlock},
587c2ffab8SAdrien Destugues	{B_TRANSLATE("Georgian"), 0x10a0, 0x10ff, false, B_BASIC_GEORGIAN_BLOCK},
597c2ffab8SAdrien Destugues	{B_TRANSLATE("Hangul Jamo"), 0x1100, 0x11ff, false, kNoBlock},
60b0452872SAxel Dörfler// TODO!
617c2ffab8SAdrien Destugues	{B_TRANSLATE("Ethiopic"), 0x1200, 0x137f, false, kNoBlock},
627c2ffab8SAdrien Destugues	{B_TRANSLATE("Ethiopic supplement"), 0x1380, 0x139f, false, kNoBlock},
637c2ffab8SAdrien Destugues	{B_TRANSLATE("Cherokee"), 0x13a0, 0x13ff, false, kNoBlock},
647c2ffab8SAdrien Destugues	{B_TRANSLATE("Unified Canadian Aboriginal syllabics"),
657c2ffab8SAdrien Destugues		0x1400, 0x167f, false, kNoBlock},
667c2ffab8SAdrien Destugues	{B_TRANSLATE("Ogham"), 0x1680, 0x169f, false, kNoBlock},
677c2ffab8SAdrien Destugues	{B_TRANSLATE("Runic"), 0x16a0, 0x16ff, false, kNoBlock},
687c2ffab8SAdrien Destugues	{B_TRANSLATE("Tagalog"), 0x1700, 0x171f, false, kNoBlock},
697c2ffab8SAdrien Destugues	{B_TRANSLATE("Hanunoo"), 0x1720, 0x173f, false, kNoBlock},
707c2ffab8SAdrien Destugues	{B_TRANSLATE("Buhid"), 0x1740, 0x175f, false, kNoBlock},
717c2ffab8SAdrien Destugues	{B_TRANSLATE("Tagbanwa"), 0x1760, 0x177f, false, kNoBlock},
727c2ffab8SAdrien Destugues	{B_TRANSLATE("Khmer"), 0x1780, 0x17ff, false, kNoBlock},
737c2ffab8SAdrien Destugues	{B_TRANSLATE("Mongolian"), 0x1800, 0x18af, false, kNoBlock},
747c2ffab8SAdrien Destugues	{B_TRANSLATE("Limbu"), 0x1900, 0x194f, false, kNoBlock},
757c2ffab8SAdrien Destugues	{B_TRANSLATE("Tai Le"), 0x1950, 0x197f, false, kNoBlock},
767c2ffab8SAdrien Destugues	{B_TRANSLATE("New Tai Lue"), 0x1980, 0x19df, false, kNoBlock},
777c2ffab8SAdrien Destugues	{B_TRANSLATE("Khmer symbols"), 0x19e0, 0x19ff, false, kNoBlock},
787c2ffab8SAdrien Destugues	{B_TRANSLATE("Buginese"), 0x1a00, 0x1a1f, false, kNoBlock},
797c2ffab8SAdrien Destugues	{B_TRANSLATE("Balinese"), 0x1b00, 0x1b7f, false, kNoBlock},
807c2ffab8SAdrien Destugues	{B_TRANSLATE("Sundanese"), 0x1b80, 0x1bbf, false, kNoBlock},
817c2ffab8SAdrien Destugues	{B_TRANSLATE("Lepcha"), 0x1c00, 0x1c4f, false, kNoBlock},
827c2ffab8SAdrien Destugues	{B_TRANSLATE("Ol Chiki"), 0x1c50, 0x1c7f, false, kNoBlock},
8345de4ebfSAugustin Cavalier	{B_TRANSLATE("Cyrillic extended C"), 0x1c80, 0x1c8f, false, kNoBlock},
847c2ffab8SAdrien Destugues	{B_TRANSLATE("Phonetic extensions"), 0x1d00, 0x1d7f, false, kNoBlock},
857c2ffab8SAdrien Destugues	{B_TRANSLATE("Phonetic extensions supplement"),
862824c5d3SAdrien Destugues		0x1d80, 0x1dbf, false, kNoBlock},
877c2ffab8SAdrien Destugues	{B_TRANSLATE("Combining diacritical marks supplement"),
887c2ffab8SAdrien Destugues		0x1dc0, 0x1dff, false, kNoBlock},
897c2ffab8SAdrien Destugues	{B_TRANSLATE("Latin extended additional"),
902824c5d3SAdrien Destugues		0x1e00, 0x1eff, false, kNoBlock},
917c2ffab8SAdrien Destugues	{B_TRANSLATE("Greek extended"), 0x1f00, 0x1fff, false, kNoBlock},
927c2ffab8SAdrien Destugues	{B_TRANSLATE("General punctuation"), 0x2000, 0x206f, false, kNoBlock},
937c2ffab8SAdrien Destugues	{B_TRANSLATE("Superscripts and subscripts"),
942824c5d3SAdrien Destugues		0x2070, 0x209f, false, kNoBlock},
957c2ffab8SAdrien Destugues	{B_TRANSLATE("Currency symbols"), 0x20a0, 0x20cf, false, kNoBlock},
967c2ffab8SAdrien Destugues	{B_TRANSLATE("Combining diacritical marks for symbols"),
972824c5d3SAdrien Destugues		0x20d0, 0x20ff, false, kNoBlock},
987c2ffab8SAdrien Destugues	{B_TRANSLATE("Letterlike symbols"), 0x2100, 0x214f, false, kNoBlock},
997c2ffab8SAdrien Destugues	{B_TRANSLATE("Number forms"), 0x2150, 0x218f, false, kNoBlock},
1007c2ffab8SAdrien Destugues	{B_TRANSLATE("Arrows"), 0x2190, 0x21ff, false, kNoBlock},
1017c2ffab8SAdrien Destugues	{B_TRANSLATE("Mathematical operators"), 0x2200, 0x22ff, false, kNoBlock},
1027c2ffab8SAdrien Destugues	{B_TRANSLATE("Miscellaneous technical"), 0x2300, 0x23ff, false, kNoBlock},
1037c2ffab8SAdrien Destugues	{B_TRANSLATE("Control pictures"), 0x2400, 0x243f, false, kNoBlock},
1047c2ffab8SAdrien Destugues	{B_TRANSLATE("Optical character recognition"),
1052824c5d3SAdrien Destugues		0x2440, 0x245f, false, kNoBlock},
1067c2ffab8SAdrien Destugues	{B_TRANSLATE("Enclosed alphanumerics"), 0x2460, 0x24ff, false, kNoBlock},
1077c2ffab8SAdrien Destugues	{B_TRANSLATE("Box drawing"), 0x2500, 0x257f, false, kNoBlock},
1087c2ffab8SAdrien Destugues	{B_TRANSLATE("Block elements"), 0x2580, 0x259f, false, kNoBlock},
1097c2ffab8SAdrien Destugues	{B_TRANSLATE("Geometric shapes"), 0x25a0, 0x25ff, false, kNoBlock},
1107c2ffab8SAdrien Destugues	{B_TRANSLATE("Miscellaneous symbols"), 0x2600, 0x26ff, false, kNoBlock},
1117c2ffab8SAdrien Destugues	{B_TRANSLATE("Dingbats"), 0x2700, 0x27bf, false, kNoBlock},
1127c2ffab8SAdrien Destugues	{B_TRANSLATE("Miscellaneous mathematical symbols A"),
1132824c5d3SAdrien Destugues		0x27c0, 0x27ef, false, kNoBlock},
1147c2ffab8SAdrien Destugues	{B_TRANSLATE("Supplemental arrows A"), 0x27f0, 0x27ff, false, kNoBlock},
1157c2ffab8SAdrien Destugues	{B_TRANSLATE("Braille patterns"), 0x2800, 0x28ff, false, kNoBlock},
1167c2ffab8SAdrien Destugues	{B_TRANSLATE("Supplemental arrows B"), 0x2900, 0x297f, false, kNoBlock},
1177c2ffab8SAdrien Destugues	{B_TRANSLATE("Miscellaneous mathematical symbols B"),
1182824c5d3SAdrien Destugues		0x2980, 0x29ff, false, kNoBlock},
1197c2ffab8SAdrien Destugues	{B_TRANSLATE("Supplemental mathematical operators"),
1202824c5d3SAdrien Destugues		0x2a00, 0x2aff, false, kNoBlock},
1217c2ffab8SAdrien Destugues	{B_TRANSLATE("Miscellaneous symbols and arrows"),
1222824c5d3SAdrien Destugues		0x2b00, 0x2bff, false, kNoBlock},
1237c2ffab8SAdrien Destugues	{B_TRANSLATE("Glagotic"), 0x2c00, 0x2c5f, false, kNoBlock},
1247c2ffab8SAdrien Destugues	{B_TRANSLATE("Latin extended C"), 0x2c60, 0x2c7f, false, kNoBlock},
1257c2ffab8SAdrien Destugues	{B_TRANSLATE("Coptic"), 0x2c80, 0x2cff, false, kNoBlock},
1267c2ffab8SAdrien Destugues	{B_TRANSLATE("Georgian supplement"), 0x2d00, 0x2d2f, false, kNoBlock},
1277c2ffab8SAdrien Destugues	{B_TRANSLATE("Tifinagh"), 0x2d30, 0x2d7f, false, kNoBlock},
1287c2ffab8SAdrien Destugues	{B_TRANSLATE("Ethiopic extended"), 0x2d80, 0x2ddf, false, kNoBlock},
1297c2ffab8SAdrien Destugues	{B_TRANSLATE("Cyrillic extended A"), 0x2de0, 0x2dff, false, kNoBlock},
1307c2ffab8SAdrien Destugues	{B_TRANSLATE("Supplement punctuation"), 0x2e00, 0x2e7f, false, kNoBlock},
1317c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK radicals supplement"), 0x2e80, 0x2eff, false, kNoBlock},
1327c2ffab8SAdrien Destugues	{B_TRANSLATE("Kangxi radicals"), 0x2f00, 0x2fdf, false, kNoBlock},
1337c2ffab8SAdrien Destugues	{B_TRANSLATE("Ideographic description characters"),
1342824c5d3SAdrien Destugues		0x2ff0, 0x2fff, false, kNoBlock},
1357c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK symbols and punctuation"),
1362824c5d3SAdrien Destugues		0x3000, 0x303f, false, kNoBlock},
1377c2ffab8SAdrien Destugues	{B_TRANSLATE("Hiragana"), 0x3040, 0x309f, false, kNoBlock},
1387c2ffab8SAdrien Destugues	{B_TRANSLATE("Katakana"), 0x30a0, 0x30ff, false, kNoBlock},
1397c2ffab8SAdrien Destugues	{B_TRANSLATE("Bopomofo"), 0x3100, 0x312f, false, kNoBlock},
1407c2ffab8SAdrien Destugues	{B_TRANSLATE("Hangul compatibility Jamo"), 0x3130, 0x318f, false, kNoBlock},
1417c2ffab8SAdrien Destugues	{B_TRANSLATE("Kanbun"), 0x3190, 0x319f, false, kNoBlock},
1427c2ffab8SAdrien Destugues	{B_TRANSLATE("Bopomofo extended"), 0x31a0, 0x31bf, false, kNoBlock},
1437c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK strokes"), 0x31c0, 0x31ef, false, kNoBlock},
1447c2ffab8SAdrien Destugues	{B_TRANSLATE("Katakana phonetic extensions"),
1452824c5d3SAdrien Destugues		0x31f0, 0x31ff, false, kNoBlock},
1462824c5d3SAdrien Destugues	{B_TRANSLATE("Enclosed CJK letters and months"),
1472824c5d3SAdrien Destugues		0x2ff0, 0x2fff, false, kNoBlock},
1487c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK compatibility"), 0x3300, 0x33ff, false, kNoBlock},
1497c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK unified ideographs extension A"),
1502824c5d3SAdrien Destugues		0x3400, 0x4dbf, false, kNoBlock},
1517c2ffab8SAdrien Destugues	{B_TRANSLATE("Yijing hexagram symbols"), 0x4dc0, 0x4dff, false, kNoBlock},
1527c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK unified ideographs"), 0x4e00, 0x9fff, false, kNoBlock},
1537c2ffab8SAdrien Destugues	{B_TRANSLATE("Yi syllables"), 0xa000, 0xa48f, false, kNoBlock},
1547c2ffab8SAdrien Destugues	{B_TRANSLATE("Yi Radicals"), 0xa490, 0xa4cf, false, kNoBlock},
1557c2ffab8SAdrien Destugues	{B_TRANSLATE("Vai"), 0xa500, 0xa63f, false, kNoBlock},
1567c2ffab8SAdrien Destugues	{B_TRANSLATE("Cyrillic extended B"), 0xa640, 0xa69f, false, kNoBlock},
1577c2ffab8SAdrien Destugues	{B_TRANSLATE("Modifier tone letters"), 0xa700, 0xa71f, false, kNoBlock},
1587c2ffab8SAdrien Destugues	{B_TRANSLATE("Latin extended D"), 0xa720, 0xa7ff, false, kNoBlock},
1597c2ffab8SAdrien Destugues	{B_TRANSLATE("Syloti Nagri"), 0xa800, 0xa82f, false, kNoBlock},
1607c2ffab8SAdrien Destugues	{B_TRANSLATE("Phags-pa"), 0xa840, 0xa87f, false, kNoBlock},
1617c2ffab8SAdrien Destugues	{B_TRANSLATE("Saurashtra"), 0xa880, 0xa8df, false, kNoBlock},
1627c2ffab8SAdrien Destugues	{B_TRANSLATE("Kayah Li"), 0xa900, 0xa92f, false, kNoBlock},
1637c2ffab8SAdrien Destugues	{B_TRANSLATE("Rejang"), 0xa930, 0xa95f, false, kNoBlock},
1647c2ffab8SAdrien Destugues	{B_TRANSLATE("Cham"), 0xaa00, 0xaa5f, false, kNoBlock},
16545de4ebfSAugustin Cavalier	{B_TRANSLATE("Cherokee supplement"), 0xab70, 0xabbf, false, kNoBlock},
1667c2ffab8SAdrien Destugues	{B_TRANSLATE("Hangul syllables"), 0xac00, 0xd7af, false, kNoBlock},
1677c2ffab8SAdrien Destugues//	{B_TRANSLATE("High surrogates"), 0xd800, 0xdb7f, false, kNoBlock},
1687c2ffab8SAdrien Destugues//	{B_TRANSLATE("High private use surrogates"), 0xdb80, 0xdbff, false, kNoBlock},
1697c2ffab8SAdrien Destugues//	{B_TRANSLATE("Low surrogates"), 0xdc00, 0xdfff, false, kNoBlock},
1707c2ffab8SAdrien Destugues	{B_TRANSLATE("Private use area"), 0xe000, 0xf8ff, true, kNoBlock},
1717c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK compatibility ideographs"),
1722824c5d3SAdrien Destugues		0xf900, 0xfaff, false, kNoBlock},
1737c2ffab8SAdrien Destugues	{B_TRANSLATE("Alphabetic presentation forms"),
1747c2ffab8SAdrien Destugues		0xfb00, 0xfb4f, false, kNoBlock},
1757c2ffab8SAdrien Destugues	{B_TRANSLATE("Arabic presentation forms A"),
1762824c5d3SAdrien Destugues		0xfb50, 0xfdff, false, kNoBlock},
1777c2ffab8SAdrien Destugues	{B_TRANSLATE("Variation selectors"), 0xfe00, 0xfe0f, false, kNoBlock},
1787c2ffab8SAdrien Destugues	{B_TRANSLATE("Vertical forms"), 0xfe10, 0xfe1f, false, kNoBlock},
1797c2ffab8SAdrien Destugues	{B_TRANSLATE("Combining half marks"), 0xfe20, 0xfe2f, false, kNoBlock},
1807c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK compatibility forms"), 0xfe30, 0xfe4f, false, kNoBlock},
1817c2ffab8SAdrien Destugues	{B_TRANSLATE("Small form variants"), 0xfe50, 0xfe6f, false, kNoBlock},
1827c2ffab8SAdrien Destugues	{B_TRANSLATE("Arabic presentation forms B"),
1832824c5d3SAdrien Destugues		0xfe70, 0xfeff, false, kNoBlock},
1847c2ffab8SAdrien Destugues	{B_TRANSLATE("Halfwidth and fullwidth forms"),
1852824c5d3SAdrien Destugues		0xff00, 0xffef, false, kNoBlock},
1867c2ffab8SAdrien Destugues	{B_TRANSLATE("Specials"), 0xfff0, 0xffff, false, kNoBlock},
1877c2ffab8SAdrien Destugues	{B_TRANSLATE("Linear B syllabary"), 0x010000, 0x01007f, false, kNoBlock},
1887c2ffab8SAdrien Destugues	{B_TRANSLATE("Linear B ideograms"), 0x010080, 0x0100ff, false, kNoBlock},
1897c2ffab8SAdrien Destugues	{B_TRANSLATE("Aegean numbers"), 0x010100, 0x01013f, false, kNoBlock},
1907c2ffab8SAdrien Destugues	{B_TRANSLATE("Ancient Greek numbers"),
1912824c5d3SAdrien Destugues		0x010140, 0x01018f, false, kNoBlock},
1922824c5d3SAdrien Destugues	{B_TRANSLATE("Ancient symbols"), 0x010190, 0x0101cf, false, kNoBlock},
1937c2ffab8SAdrien Destugues	{B_TRANSLATE("Phaistos disc"), 0x0101d0, 0x0101ff, false, kNoBlock},
1947c2ffab8SAdrien Destugues	{B_TRANSLATE("Lycian"), 0x010280, 0x01029f, false, kNoBlock},
1957c2ffab8SAdrien Destugues	{B_TRANSLATE("Carian"), 0x0102a0, 0x0102df, false, kNoBlock},
1967c2ffab8SAdrien Destugues	{B_TRANSLATE("Old italic"), 0x010300, 0x01032f, false, kNoBlock},
1977c2ffab8SAdrien Destugues	{B_TRANSLATE("Gothic"), 0x010330, 0x01034f, false, kNoBlock},
1987c2ffab8SAdrien Destugues	{B_TRANSLATE("Ugaritic"), 0x010380, 0x01039f, false, kNoBlock},
1997c2ffab8SAdrien Destugues	{B_TRANSLATE("Old Persian"), 0x0103a0, 0x0103df, false, kNoBlock},
2007c2ffab8SAdrien Destugues	{B_TRANSLATE("Deseret"), 0x010400, 0x01044f, false, kNoBlock},
2017c2ffab8SAdrien Destugues	{B_TRANSLATE("Shavian"), 0x010450, 0x01047f, false, kNoBlock},
2027c2ffab8SAdrien Destugues	{B_TRANSLATE("Osmanya"), 0x010480, 0x0104af, false, kNoBlock},
203b3a584c3SGareth Poole	{B_TRANSLATE("Osage"), 0x0104b0, 0x0104ff, false, kNoBlock},
2047c2ffab8SAdrien Destugues	{B_TRANSLATE("Cypriot syllabary"), 0x010800, 0x01083f, false, kNoBlock},
20586d16b89SGareth Poole	{B_TRANSLATE("Hatran"), 0x0108e0, 0x0108ff, false, kNoBlock},
2067c2ffab8SAdrien Destugues	{B_TRANSLATE("Phoenician"), 0x010900, 0x01091f, false, kNoBlock},
2077c2ffab8SAdrien Destugues	{B_TRANSLATE("Lydian"), 0x010920, 0x01093f, false, kNoBlock},
2087c2ffab8SAdrien Destugues	{B_TRANSLATE("Kharoshthi"), 0x010a00, 0x010a5f, false, kNoBlock},
20986d16b89SGareth Poole	{B_TRANSLATE("Old Hungarian"), 0x010c80, 0x010cff, false, kNoBlock},
21086d16b89SGareth Poole	{B_TRANSLATE("Multani"), 0x011280, 0x0112af, false, kNoBlock},
211b3a584c3SGareth Poole	{B_TRANSLATE("Newa"), 0x011400, 0x01147f, false, kNoBlock},
21245de4ebfSAugustin Cavalier	{B_TRANSLATE("Mongolian supplement"), 0x011660, 0x01167f, false, kNoBlock},
21386d16b89SGareth Poole	{B_TRANSLATE("Ahom"), 0x011700, 0x01173f, false, kNoBlock},
214b3a584c3SGareth Poole	{B_TRANSLATE("Bhaiksuki"), 0x011c00, 0x011c6f, false, kNoBlock},
215b3a584c3SGareth Poole	{B_TRANSLATE("Marchen"), 0x011c70, 0x011cbf, false, kNoBlock},
2167c2ffab8SAdrien Destugues	{B_TRANSLATE("Cuneiform"), 0x012000, 0x0123ff, false, kNoBlock},
2177c2ffab8SAdrien Destugues	{B_TRANSLATE("Cuneiform numbers and punctuation"),
2182824c5d3SAdrien Destugues		0x012400, 0x01247f, false, kNoBlock},
21986d16b89SGareth Poole	{B_TRANSLATE("Early Dynastic Cuneiform"),
22086d16b89SGareth Poole		0x012480, 0x01254f, false, kNoBlock},
22145de4ebfSAugustin Cavalier	{B_TRANSLATE("Anatolian hieroglyphs"), 0x014400, 0x01467f, false, kNoBlock},
22245de4ebfSAugustin Cavalier	{B_TRANSLATE("Ideographic symbols and punctuation"),
223b3a584c3SGareth Poole		0x016fe0, 0x016fff, false, kNoBlock},
224b3a584c3SGareth Poole	{B_TRANSLATE("Tangut"), 0x017000, 0x0187ff, false, kNoBlock},
22545de4ebfSAugustin Cavalier	{B_TRANSLATE("Tangut components"), 0x018800, 0x018aff, false, kNoBlock},
2267c2ffab8SAdrien Destugues	{B_TRANSLATE("Byzantine musical symbols"),
2272824c5d3SAdrien Destugues		0x01d000, 0x01d0ff, false, kNoBlock},
2289ea3ffe6SHumdinger	{B_TRANSLATE("Musical symbols"), 0x01d100, 0x01d1ff, false, kNoBlock},
2297c2ffab8SAdrien Destugues	{B_TRANSLATE("Ancient Greek musical notation"),
2302824c5d3SAdrien Destugues		0x01d200, 0x01d24f, false, kNoBlock},
2317c2ffab8SAdrien Destugues	{B_TRANSLATE("Tai Xuan Jing symbols"),
2322824c5d3SAdrien Destugues		0x01d300, 0x01d35f, false, kNoBlock},
2337c2ffab8SAdrien Destugues	{B_TRANSLATE("Counting rod numerals"),
2342824c5d3SAdrien Destugues		0x01d360, 0x01d37f, false, kNoBlock},
2357c2ffab8SAdrien Destugues	{B_TRANSLATE("Mathematical alphanumeric symbols"),
2362824c5d3SAdrien Destugues		0x01d400, 0x01d7ff, false, kNoBlock},
23786d16b89SGareth Poole	{B_TRANSLATE("Sutton SignWriting"), 0x01d800, 0x01daaf, false, kNoBlock},
23845de4ebfSAugustin Cavalier	{B_TRANSLATE("Glagolitic supplement"), 0x01e000, 0x01e02f, false, kNoBlock},
239b3a584c3SGareth Poole	{B_TRANSLATE("Adlam"), 0x01e900, 0x01e95f, false, kNoBlock},
2407c2ffab8SAdrien Destugues	{B_TRANSLATE("Mahjong tiles"), 0x01f000, 0x01f02f, false, kNoBlock},
2417c2ffab8SAdrien Destugues	{B_TRANSLATE("Domino tiles"), 0x01f030, 0x01f09f, false, kNoBlock},
24286d16b89SGareth Poole	{B_TRANSLATE("Supplemental Symbols and Pictographs"), 0x01f900, 0x01f9ff, false, kNoBlock},
2437c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK unified ideographs extension B"),
2442824c5d3SAdrien Destugues		0x020000, 0x02a6df, false, kNoBlock},
24545de4ebfSAugustin Cavalier	{B_TRANSLATE("CJK unified ideographs extension E"),
24686d16b89SGareth Poole		0x02b820, 0x02ceaf, false, kNoBlock},
2477c2ffab8SAdrien Destugues	{B_TRANSLATE("CJK compatibility ideographs Supplement"),
2482824c5d3SAdrien Destugues		0x02f800, 0x02fa1f, false, kNoBlock},
2497c2ffab8SAdrien Destugues	{B_TRANSLATE("Tags"), 0x0e0000, 0x0e007f, false, kNoBlock},
2507c2ffab8SAdrien Destugues	{B_TRANSLATE("Variation selectors supplement"),
2512824c5d3SAdrien Destugues		0x0e0100, 0x0e01ef, false, kNoBlock},
2527c2ffab8SAdrien Destugues	{B_TRANSLATE("Supplementary private use area A"),
2532824c5d3SAdrien Destugues		0x0f0000, 0x0fffff, true, kNoBlock},
2547c2ffab8SAdrien Destugues	{B_TRANSLATE("Supplementary private use area B"),
2552824c5d3SAdrien Destugues		0x100000, 0x10ffff, true, kNoBlock},
256b0452872SAxel Dörfler};
257b0452872SAxel Dörfler
258b0452872SAxel Dörflerconst uint32 kNumUnicodeBlocks
259b0452872SAxel Dörfler	= sizeof(kUnicodeBlocks) / sizeof(kUnicodeBlocks[0]);
26019390213SDale Cieslak
26119390213SDale Cieslak
26219390213SDale Cieslakint32
26319390213SDale CieslakBlockForCharacter(const uint32 character)
26419390213SDale Cieslak{
26519390213SDale Cieslak	uint32 min = 0;
26619390213SDale Cieslak	uint32 max = kNumUnicodeBlocks;
26719390213SDale Cieslak	uint32 guess = (max + min) / 2;
26819390213SDale Cieslak
26919390213SDale Cieslak	while ((max >= min) && (guess < kNumUnicodeBlocks)) {
27019390213SDale Cieslak		uint32 start = kUnicodeBlocks[guess].start;
27119390213SDale Cieslak		uint32 end = kUnicodeBlocks[guess].end;
27219390213SDale Cieslak
27319390213SDale Cieslak		if (start <= character && end >= character)
27419390213SDale Cieslak			return guess;
27519390213SDale Cieslak
27619390213SDale Cieslak		if (end < character) {
27719390213SDale Cieslak			min = guess + 1;
27819390213SDale Cieslak		} else {
27919390213SDale Cieslak			max = guess - 1;
28019390213SDale Cieslak		}
28119390213SDale Cieslak
28219390213SDale Cieslak		guess = (max + min) / 2;
28319390213SDale Cieslak	}
28419390213SDale Cieslak
28519390213SDale Cieslak	return -1;
28619390213SDale Cieslak}
287