Last active
June 25, 2016 08:26
-
-
Save crlf0710/758edbf2508189040636fa5ab8b11f5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script works when you open the CodeCharts.pdf from Unicode 9.0.0 standard in Acrobat/Reader. | |
var execGotoUnicodePageDlg = app.trustedFunction (function () { | |
if (this.numPages != 2489) { | |
app.alert("This is NOT Unicode 9.0 CodeCharts.pdf"); | |
return; | |
} | |
var doc = this; | |
var dlg = { | |
description: { name: "Goto Unicode", | |
elements: [ { type: "view", elements: [ | |
{ name: "Unicode:", type: "static_text", }, | |
{ item_id: "code", type: "edit_text", width: 88, height: 23, }, | |
{ type: "ok", }, | |
]},]}, | |
commit: function (dialog) { | |
var results = dialog.store(); | |
if (typeof(results.code) != "string") { | |
app.alert("Invalid input!"); | |
return; | |
} | |
if (results.code == "") return; | |
if (results.code.match(/^[0-9a-fA-F]+$/) == null) { | |
app.alert("Invalid input!"); | |
return; | |
} | |
var code = parseInt("0x" + results.code, 16); | |
if (code < 0 || code > 0x10FFFF) { | |
app.alert("Invalid input!"); | |
return; | |
} | |
var tbl = [ | |
[1, 0x0000, "Basic Latin"], | |
[6, 0x0080, "Latin-1 Supplement"], | |
[11, 0x0100, "Latin Extended-A"], | |
[16, 0x0180, "Latin Extended-B"], | |
[22, 0x0250, "IPA Extensions"], | |
[26, 0x02B0, "Spacing Modifier Letters"], | |
[30, 0x0300, "Combining Diacritical Marks"], | |
[34, 0x0370, "Greek and Coptic"], | |
[38, 0x0400, "Cyrillic"], | |
[44, 0x0500, "Cyrillic Supplement"], | |
[46, 0x0530, "Armenian"], | |
[48, 0x0590, "Hebrew"], | |
[51, 0x0600, "Arabic"], | |
[57, 0x0700, "Syriac"], | |
[60, 0x0750, "Arabic Supplement"], | |
[62, 0x0780, "Thaana"], | |
[64, 0x07C0, "NKo"], | |
[66, 0x0800, "Samaritan"], | |
[68, 0x0840, "Mandaic"], | |
[70, 0x08A0, "Arabic Extended-A"], | |
[73, 0x0900, "Devanagari"], | |
[76, 0x0980, "Bengali"], | |
[79, 0x0A00, "Gurmukhi"], | |
[82, 0x0A80, "Gujarati"], | |
[84, 0x0B00, "Oriya"], | |
[87, 0x0B80, "Tamil"], | |
[90, 0x0C00, "Telugu"], | |
[93, 0x0C80, "Kannada"], | |
[96, 0x0D00, "Malayalam"], | |
[99, 0x0D80, "Sinhala"], | |
[102, 0x0E00, "Thai"], | |
[105, 0x0E80, "Lao"], | |
[108, 0x0F00, "Tibetan"], | |
[113, 0x1000, "Myanmar"], | |
[116, 0x10A0, "Georgian"], | |
[118, 0x1100, "Hangul Jamo"], | |
[122, 0x1200, "Ethiopic"], | |
[128, 0x1380, "Ethiopic Supplement"], | |
[130, 0x13A0, "Cherokee"], | |
[132, 0x1400, "Unified Canadian Aboriginal Syllabics"], | |
[142, 0x1680, "Ogham"], | |
[144, 0x16A0, "Runic"], | |
[146, 0x1700, "Tagalog"], | |
[148, 0x1720, "Hanunoo"], | |
[150, 0x1740, "Buhid"], | |
[152, 0x1760, "Tagbanwa"], | |
[154, 0x1780, "Khmer"], | |
[158, 0x1800, "Mongolian"], | |
[172, 0x18B0, "Unified Canadian Aboriginal Syllabics Extended"], | |
[174, 0x1900, "Limbu"], | |
[176, 0x1950, "Tai Le"], | |
[178, 0x1980, "New Tai Lue"], | |
[180, 0x19E0, "Khmer Symbols"], | |
[182, 0x1A00, "Buginese"], | |
[184, 0x1A20, "Tai Tham"], | |
[187, 0x1AB0, "Combining Diacritical Marks Extended"], | |
[189, 0x1B00, "Balinese"], | |
[192, 0x1B80, "Sundanese"], | |
[194, 0x1BC0, "Batak"], | |
[196, 0x1C00, "Lepcha"], | |
[198, 0x1C50, "Ol Chiki"], | |
[200, 0x1C80, "Cyrillic Extended-C"], | |
[202, 0x1CC0, "Sundanese Supplement"], | |
[204, 0x1CD0, "Vedic Extensions"], | |
[206, 0x1D00, "Phonetic Extensions"], | |
[210, 0x1D80, "Phonetic Extensions Supplement"], | |
[213, 0x1DC0, "Combining Diacritical Marks Supplement"], | |
[215, 0x1E00, "Latin Extended Additional"], | |
[222, 0x1F00, "Greek Extended"], | |
[229, 0x2000, "General Punctuation"], | |
[234, 0x2070, "Superscripts and Subscripts"], | |
[236, 0x20A0, "Currency Symbols"], | |
[238, 0x20D0, "Combining Diacritical Marks for Symbols"], | |
[240, 0x2100, "Letterlike Symbols"], | |
[244, 0x2150, "Number Forms"], | |
[247, 0x2190, "Arrows"], | |
[250, 0x2200, "Mathematical Operators"], | |
[257, 0x2300, "Miscellaneous Technical"], | |
[263, 0x2400, "Control Pictures"], | |
[265, 0x2440, "Optical Character Recognition"], | |
[267, 0x2460, "Enclosed Alphanumerics"], | |
[271, 0x2500, "Box Drawing"], | |
[274, 0x2580, "Block Elements"], | |
[276, 0x25A0, "Geometric Shapes"], | |
[279, 0x2600, "Miscellaneous Symbols"], | |
[287, 0x2700, "Dingbats"], | |
[292, 0x27C0, "Miscellaneous Mathematical Symbols-A"], | |
[295, 0x27F0, "Supplemental Arrows-A"], | |
[297, 0x2800, "Braille Patterns"], | |
[301, 0x2900, "Supplemental Arrows-B"], | |
[305, 0x2980, "Miscellaneous Mathematical Symbols-B"], | |
[309, 0x2A00, "Supplemental Mathematical Operators"], | |
[315, 0x2B00, "Miscellaneous Symbols and Arrows"], | |
[321, 0x2C00, "Glagolitic"], | |
[323, 0x2C60, "Latin Extended-C"], | |
[325, 0x2C80, "Coptic"], | |
[328, 0x2D00, "Georgian Supplement"], | |
[330, 0x2D30, "Tifinagh"], | |
[332, 0x2D80, "Ethiopic Extended"], | |
[334, 0x2DE0, "Cyrillic Extended-A"], | |
[336, 0x2E00, "Supplemental Punctuation"], | |
[339, 0x2E80, "CJK Radicals Supplement"], | |
[343, 0x2F00, "Kangxi Radicals"], | |
[348, 0x2FF0, "Ideographic Description Characters"], | |
[350, 0x3000, "CJK Symbols and Punctuation"], | |
[353, 0x3040, "Hiragana"], | |
[356, 0x30A0, "Katakana"], | |
[359, 0x3100, "Bopomofo"], | |
[361, 0x3130, "Hangul Compatibility Jamo"], | |
[364, 0x3190, "Kanbun"], | |
[366, 0x31A0, "Bopomofo Extended"], | |
[368, 0x31C0, "CJK Strokes"], | |
[370, 0x31F0, "Katakana Phonetic Extensions"], | |
[372, 0x3200, "Enclosed CJK Letters and Months"], | |
[378, 0x3300, "CJK Compatibility"], | |
[385, 0x3400, "CJK Unified Ideographs Extension A"], | |
[502, 0x4DC0, "Yijing Hexagram Symbols"], | |
[504, 0x4E00, "CJK Unified Ideographs"], | |
[1028, 0xA000, "Yi Syllables"], | |
[1043, 0xA490, "Yi Radicals"], | |
[1045, 0xA4D0, "Lisu"], | |
[1047, 0xA500, "Vai"], | |
[1052, 0xA640, "Cyrillic Extended-B"], | |
[1055, 0xA6A0, "Bamum"], | |
[1057, 0xA700, "Modifier Tone Letters"], | |
[1059, 0xA720, "Latin Extended-D"], | |
[1063, 0xA800, "Syloti Nagri"], | |
[1065, 0xA830, "Common Indic Number Forms"], | |
[1067, 0xA840, "Phags-pa"], | |
[1071, 0xA880, "Saurashtra"], | |
[1073, 0xA8E0, "Devanagari Extended"], | |
[1075, 0xA900, "Kayah Li"], | |
[1077, 0xA930, "Rejang"], | |
[1079, 0xA960, "Hangul Jamo Extended-A"], | |
[1081, 0xA980, "Javanese"], | |
[1084, 0xA9E0, "Myanmar Extended-B"], | |
[1086, 0xAA00, "Cham"], | |
[1088, 0xAA60, "Myanmar Extended-A"], | |
[1090, 0xAA80, "Tai Viet"], | |
[1092, 0xAAE0, "Meetei Mayek Extensions"], | |
[1094, 0xAB00, "Ethiopic Extended-A"], | |
[1096, 0xAB30, "Latin Extended-E"], | |
[1098, 0xAB70, "Cherokee Supplement"], | |
[1100, 0xABC0, "Meetei Mayek"], | |
[1102, 0xAC00, "Hangul Syllables"], | |
[1146, 0xD7B0, "Hangul Jamo Extended-B"], | |
[1148, 0xF900, "CJK Compatibility Ideographs"], | |
[1162, 0xFB00, "Alphabetic Presentation Forms"], | |
[1165, 0xFB50, "Arabic Presentation Forms-A"], | |
[1182, 0xFE00, "Variation Selectors"], | |
[1184, 0xFE10, "Vertical Forms"], | |
[1186, 0xFE20, "Combining Half Marks"], | |
[1188, 0xFE30, "CJK Compatibility Forms"], | |
[1190, 0xFE50, "Small Form Variants"], | |
[1192, 0xFE70, "Arabic Presentation Forms-B"], | |
[1196, 0xFF00, "Halfwidth and Fullwidth Forms"], | |
[1201, 0xFFF0, "Specials"], | |
[1203, 0x10000, "Linear B Syllabary"], | |
[1205, 0x10080, "Linear B Ideograms"], | |
[1208, 0x10100, "Aegean Numbers"], | |
[1210, 0x10140, "Ancient Greek Numbers"], | |
[1212, 0x10190, "Ancient Symbols"], | |
[1214, 0x101D0, "Phaistos Disc"], | |
[1216, 0x10280, "Lycian"], | |
[1218, 0x102A0, "Carian"], | |
[1220, 0x102E0, "Coptic Epact Numbers"], | |
[1222, 0x10300, "Old Italic"], | |
[1224, 0x10330, "Gothic"], | |
[1226, 0x10350, "Old Permic"], | |
[1228, 0x10380, "Ugaritic"], | |
[1230, 0x103A0, "Old Persian"], | |
[1232, 0x10400, "Deseret"], | |
[1234, 0x10450, "Shavian"], | |
[1236, 0x10480, "Osmanya"], | |
[1238, 0x104B0, "Osage"], | |
[1240, 0x10500, "Elbasan"], | |
[1242, 0x10530, "Caucasian Albanian"], | |
[1244, 0x10600, "Linear A"], | |
[1251, 0x10800, "Cypriot Syllabary"], | |
[1253, 0x10840, "Imperial Aramaic"], | |
[1255, 0x10860, "Palmyrene"], | |
[1257, 0x10880, "Nabataean"], | |
[1259, 0x108E0, "Hatran"], | |
[1261, 0x10900, "Phoenician"], | |
[1263, 0x10920, "Lydian"], | |
[1265, 0x10980, "Meroitic Hieroglyphs"], | |
[1267, 0x109A0, "Meroitic Cursive"], | |
[1270, 0x10A00, "Kharoshthi"], | |
[1272, 0x10A60, "Old South Arabian"], | |
[1274, 0x10A80, "Old North Arabian"], | |
[1276, 0x10AC0, "Manichaean"], | |
[1279, 0x10B00, "Avestan"], | |
[1281, 0x10B40, "Inscriptional Parthian"], | |
[1283, 0x10B60, "Inscriptional Pahlavi"], | |
[1285, 0x10B80, "Psalter Pahlavi"], | |
[1287, 0x10C00, "Old Turkic"], | |
[1289, 0x10C80, "Old Hungarian"], | |
[1292, 0x10E60, "Rumi Numeral Symbols"], | |
[1294, 0x11000, "Brahmi"], | |
[1297, 0x11080, "Kaithi"], | |
[1299, 0x110D0, "Sora Sompeng"], | |
[1301, 0x11100, "Chakma"], | |
[1304, 0x11150, "Mahajani"], | |
[1306, 0x11180, "Sharada"], | |
[1309, 0x111E0, "Sinhala Archaic Numbers"], | |
[1311, 0x11200, "Khojki"], | |
[1313, 0x11280, "Multani"], | |
[1315, 0x112B0, "Khudawadi"], | |
[1317, 0x11300, "Grantha"], | |
[1320, 0x11400, "Newa"], | |
[1323, 0x11480, "Tirhuta"], | |
[1325, 0x11580, "Siddham"], | |
[1328, 0x11600, "Modi"], | |
[1330, 0x11660, "Mongolian Supplement"], | |
[1332, 0x11680, "Takri"], | |
[1334, 0x11700, "Ahom"], | |
[1336, 0x118A0, "Warang Citi"], | |
[1338, 0x11AC0, "Pau Cin Hau"], | |
[1340, 0x11C00, "Bhaiksuki"], | |
[1342, 0x11C70, "Marchen"], | |
[1344, 0x12000, "Cuneiform"], | |
[1356, 0x12400, "Cuneiform Numbers and Punctuation"], | |
[1359, 0x12480, "Early Dynastic Cuneiform"], | |
[1362, 0x13000, "Egyptian Hieroglyphs"], | |
[1378, 0x14400, "Anatolian Hieroglyphs"], | |
[1390, 0x16800, "Bamum Supplement"], | |
[1398, 0x16A40, "Mro"], | |
[1400, 0x16AD0, "Bassa Vah"], | |
[1402, 0x16B00, "Pahawh Hmong"], | |
[1405, 0x16F00, "Miao"], | |
[1408, 0x16FE0, "Ideographic Symbols and Punctuation"], | |
[1410, 0x17000, "Tangut"], | |
[1472, 0x18800, "Tangut Components"], | |
[1482, 0x1B000, "Kana Supplement"], | |
[1484, 0x1BC00, "Duployan"], | |
[1490, 0x1BCA0, "Shorthand Format Controls"], | |
[1492, 0x1D000, "Byzantine Musical Symbols"], | |
[1497, 0x1D100, "Musical Symbols"], | |
[1502, 0x1D200, "Ancient Greek Musical Notation"], | |
[1505, 0x1D300, "Tai Xuan Jing Symbols"], | |
[1507, 0x1D360, "Counting Rod Numerals"], | |
[1509, 0x1D400, "Mathematical Alphanumeric Symbols"], | |
[1532, 0x1D800, "Sutton SignWriting"], | |
[1544, 0x1E800, "Mende Kikakui"], | |
[1546, 0x1E000, "Glagolitic Supplement"], | |
[1550, 0x1E900, "Adlam"], | |
[1552, 0x1EE00, "Arabic Mathematical Alphabetic Symbols"], | |
[1557, 0x1F000, "Mahjong Tiles"], | |
[1559, 0x1F030, "Domino Tiles"], | |
[1561, 0x1F0A0, "Playing Cards"], | |
[1564, 0x1F100, "Enclosed Alphanumeric Supplement"], | |
[1569, 0x1F200, "Enclosed Ideographic Supplement"], | |
[1572, 0x1F300, "Miscellaneous Symbols and Pictographs"], | |
[1589, 0x1F600, "Emoticons"], | |
[1592, 0x1F650, "Ornamental Dingbats"], | |
[1594, 0x1F680, "Transport and Map Symbols"], | |
[1597, 0x1F700, "Alchemical Symbols"], | |
[1601, 0x1F780, "Geometric Shapes Extended"], | |
[1604, 0x1F800, "Supplemental Arrows-C"], | |
[1608, 0x1F900, "Supplemental Symbols and Pictographs"], | |
[1611, 0x20000, "CJK Unified Ideographs Extension B"], | |
[2339, 0x2A700, "CJK Unified Ideographs Extension C"], | |
[2392, 0x2B740, "CJK Unified Ideographs Extension D"], | |
[2395, 0x2B820, "CJK Unified Ideographs Extension E"], | |
[2468, 0x2F800, "CJK Compatibility Ideographs Supplement"], | |
[2484, 0xE0000, "Tags"], | |
[2486, 0xE0100, "Variation Selectors Supplement"], | |
]; | |
for (var i = 0, c = tbl.length; i < c; i++) | |
{ | |
if (code >= tbl[i][1] && (i + 1 >= c || code < tbl[i+1][1])) { | |
console.println("UnicodeQuery: Jumping to Page #" + tbl[i][0] + ", Range " + tbl[i][2]); | |
doc.pageNum = tbl[i][0]; | |
} | |
} | |
} | |
}; | |
app.beginPriv(); | |
app.execDialog(dlg); | |
app.endPriv(); | |
}); | |
// for use inside a custom command (recommended for Acrobat DC), uncomment the next line. | |
execGotoUnicodePageDlg(); | |
// for use inside a javascript addon, uncomment the section below. | |
/* | |
app.addToolButton({ | |
cName: "unicodeQueryBtn", // A name for your button | |
cExec: "execGotoUnicodePageDlg()", //Function to Call | |
cLabel: "Goto Unicode", //The Text on the Button | |
cTooltext: "Goto CodeCharts.pdf Page for Unicode code point" //The Help Text | |
}); | |
//*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment