From c18cdb6998c488c92d5e62448f7db3eebcae7d99 Mon Sep 17 00:00:00 2001 From: zfletch Date: Fri, 30 Apr 2021 10:36:47 -0400 Subject: [PATCH 1/3] support aditional order for beta code to unicode Add support for the following order: On uppercase letters these are keyed in the order: (1) asterisk, (2) breathing, (3) accent, (4) letter, (5) iota subscript. E.g. *(=W| This is the order specified in the [TLG manual web page](http://stephanus.tlg.uci.edu/encoding.php). --- beta_code_to_unicode.json | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/beta_code_to_unicode.json b/beta_code_to_unicode.json index 7501955..7749eff 100644 --- a/beta_code_to_unicode.json +++ b/beta_code_to_unicode.json @@ -17,11 +17,17 @@ "*(/u": "Ὕ", "*(/w": "Ὥ", "*(/|A": "ᾍ", + "*(/A|": "ᾍ", "*(/|H": "ᾝ", + "*(/H|": "ᾝ", "*(/|W": "ᾭ", + "*(/W|": "ᾭ", "*(/|a": "ᾍ", + "*(/a|": "ᾍ", "*(/|h": "ᾝ", + "*(/h|": "ᾝ", "*(/|w": "ᾭ", + "*(/w|": "ᾭ", "*(=A": "Ἇ", "*(=H": "Ἧ", "*(=I": "Ἷ", @@ -33,11 +39,17 @@ "*(=u": "Ὗ", "*(=w": "Ὧ", "*(=|A": "ᾏ", + "*(=A|": "ᾏ", "*(=|H": "ᾟ", + "*(=H|": "ᾟ", "*(=|W": "ᾯ", + "*(=W|": "ᾯ", "*(=|a": "ᾏ", + "*(=a|": "ᾏ", "*(=|h": "ᾟ", + "*(=h|": "ᾟ", "*(=|w": "ᾯ", + "*(=w|": "ᾯ", "*(A": "Ἁ", "*(E": "Ἑ", "*(H": "Ἡ", @@ -61,11 +73,17 @@ "*(\\u": "Ὓ", "*(\\w": "Ὣ", "*(\\|A": "ᾋ", + "*(\\A|": "ᾋ", "*(\\|H": "ᾛ", + "*(\\H|": "ᾛ", "*(\\|W": "ᾫ", + "*(\\W|": "ᾫ", "*(\\|a": "ᾋ", + "*(\\a|": "ᾋ", "*(\\|h": "ᾛ", + "*(\\h|": "ᾛ", "*(\\|w": "ᾫ", + "*(\\w|": "ᾫ", "*(a": "Ἁ", "*(e": "Ἑ", "*(h": "Ἡ", @@ -75,11 +93,17 @@ "*(u": "Ὑ", "*(w": "Ὡ", "*(|A": "ᾉ", + "*(A|": "ᾉ", "*(|H": "ᾙ", + "*(H|": "ᾙ", "*(|W": "ᾩ", + "*(W|": "ᾩ", "*(|a": "ᾉ", + "*(a|": "ᾉ", "*(|h": "ᾙ", + "*(h|": "ᾙ", "*(|w": "ᾩ", + "*(w|": "ᾩ", "*)/A": "Ἄ", "*)/E": "Ἔ", "*)/H": "Ἤ", @@ -93,11 +117,17 @@ "*)/o": "Ὄ", "*)/w": "Ὤ", "*)/|A": "ᾌ", + "*)/A|": "ᾌ", "*)/|H": "ᾜ", + "*)/H|": "ᾜ", "*)/|W": "ᾬ", + "*)/W|": "ᾬ", "*)/|a": "ᾌ", + "*)/a|": "ᾌ", "*)/|h": "ᾜ", + "*)/h|": "ᾜ", "*)/|w": "ᾬ", + "*)/w|": "ᾬ", "*)=A": "Ἆ", "*)=H": "Ἦ", "*)=I": "Ἶ", @@ -107,11 +137,17 @@ "*)=i": "Ἶ", "*)=w": "Ὦ", "*)=|A": "ᾎ", + "*)=A|": "ᾎ", "*)=|H": "ᾞ", + "*)=H|": "ᾞ", "*)=|W": "ᾮ", + "*)=W|": "ᾮ", "*)=|a": "ᾎ", + "*)=a|": "ᾎ", "*)=|h": "ᾞ", + "*)=h|": "ᾞ", "*)=|w": "ᾮ", + "*)=w|": "ᾮ", "*)A": "Ἀ", "*)E": "Ἐ", "*)H": "Ἠ", @@ -131,11 +167,17 @@ "*)\\o": "Ὂ", "*)\\w": "Ὢ", "*)\\|A": "ᾊ", + "*)\\A|": "ᾊ", "*)\\|H": "ᾚ", + "*)\\H|": "ᾚ", "*)\\|W": "ᾪ", + "*)\\W|": "ᾪ", "*)\\|a": "ᾊ", + "*)\\a|": "ᾊ", "*)\\|h": "ᾚ", + "*)\\h|": "ᾚ", "*)\\|w": "ᾪ", + "*)\\w|": "ᾪ", "*)a": "Ἀ", "*)e": "Ἐ", "*)h": "Ἠ", @@ -143,11 +185,17 @@ "*)o": "Ὀ", "*)w": "Ὠ", "*)|A": "ᾈ", + "*)A|": "ᾈ", "*)|H": "ᾘ", + "*)H|": "ᾘ", "*)|W": "ᾨ", + "*)W|": "ᾨ", "*)|a": "ᾈ", + "*)a|": "ᾈ", "*)|h": "ᾘ", + "*)h|": "ᾘ", "*)|w": "ᾨ", + "*)w|": "ᾨ", "*+I": "Ϊ", "*+U": "Ϋ", "*+i": "Ϊ", From f8de775fced25765a8e9d29457789b544d35e947 Mon Sep 17 00:00:00 2001 From: zfletch Date: Fri, 30 Apr 2021 10:49:19 -0400 Subject: [PATCH 2/3] use standard diacritic order for uppercase letters In `unicode_to_beta_code.json`, use the diacritic order specified by the [TLG Beta Code Manual web page](http://stephanus.tlg.uci.edu/encoding.php). --- unicode_to_beta_code.json | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/unicode_to_beta_code.json b/unicode_to_beta_code.json index 07b9a2d..10ec9fb 100644 --- a/unicode_to_beta_code.json +++ b/unicode_to_beta_code.json @@ -197,14 +197,14 @@ "ᾅ": "a(/|", "ᾆ": "a)=|", "ᾇ": "a(=|", - "ᾈ": "*)|a", - "ᾉ": "*(|a", - "ᾊ": "*)\\|a", - "ᾋ": "*(\\|a", - "ᾌ": "*)/|a", - "ᾍ": "*(/|a", - "ᾎ": "*)=|a", - "ᾏ": "*(=|a", + "ᾈ": "*)a|", + "ᾉ": "*(a|", + "ᾊ": "*)\\a|", + "ᾋ": "*(\\a|", + "ᾌ": "*)/a|", + "ᾍ": "*(/a|", + "ᾎ": "*)=a|", + "ᾏ": "*(=a|", "ᾐ": "h)|", "ᾑ": "h(|", "ᾒ": "h)\\|", @@ -213,14 +213,14 @@ "ᾕ": "h(/|", "ᾖ": "h)=|", "ᾗ": "h(=|", - "ᾘ": "*)|h", - "ᾙ": "*(|h", - "ᾚ": "*)\\|h", - "ᾛ": "*(\\|h", - "ᾜ": "*)/|h", - "ᾝ": "*(/|h", - "ᾞ": "*)=|h", - "ᾟ": "*(=|h", + "ᾘ": "*)h|", + "ᾙ": "*(h|", + "ᾚ": "*)\\h|", + "ᾛ": "*(\\h|", + "ᾜ": "*)/h|", + "ᾝ": "*(/h|", + "ᾞ": "*)=h|", + "ᾟ": "*(=h|", "ᾠ": "w)|", "ᾡ": "w(|", "ᾢ": "w)\\|", @@ -229,21 +229,21 @@ "ᾥ": "w(/|", "ᾦ": "w)=|", "ᾧ": "w(=|", - "ᾨ": "*)|w", - "ᾩ": "*(|w", - "ᾪ": "*)\\|w", - "ᾫ": "*(\\|w", - "ᾬ": "*)/|w", - "ᾭ": "*(/|w", - "ᾮ": "*)=|w", - "ᾯ": "*(=|w", + "ᾨ": "*)w|", + "ᾩ": "*(w|", + "ᾪ": "*)\\w|", + "ᾫ": "*(\\w|", + "ᾬ": "*)/w|", + "ᾭ": "*(/w|", + "ᾮ": "*)=w|", + "ᾯ": "*(=w|", "ᾲ": "a\\|", "ᾳ": "a|", "ᾴ": "a/|", "ᾶ": "a=", "ᾷ": "a=|", "Ὰ": "*\\a", - "ᾼ": "*|a", + "ᾼ": "*a|", "᾽": "'", "ῂ": "h\\|", "ῃ": "h|", @@ -252,7 +252,7 @@ "ῇ": "h=|", "Ὲ": "*\\e", "Ὴ": "*\\h", - "ῌ": "*|h", + "ῌ": "*h|", "ῒ": "i\\+", "ῖ": "i=", "ῗ": "i=+", @@ -271,6 +271,6 @@ "ῷ": "w=|", "Ὸ": "*\\o", "Ὼ": "*\\w", - "ῼ": "*|w", + "ῼ": "*w|", "—": "_" } From e3f2b0412fbed6d8ea3ddefba353c6d9842b5239 Mon Sep 17 00:00:00 2001 From: zfletch Date: Fri, 30 Apr 2021 11:10:13 -0400 Subject: [PATCH 3/3] include tlg spec and exceptions in readme --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index d54b7d7..ece8718 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,19 @@ Map of Greek Beta Code characters to Unicode and from Unicode to Beta Code. +## Standard + +The mappings in this repository aim mostly to conform to the TLG standard +specified [here](http://stephanus.tlg.uci.edu/encoding.php). + +Not every application that uses Greek Beta Code follows the TLG standard exactly. +The mappings try to capture these nonstandard uses without breaking Beta Code encoded +according to the standard in the following ways: + +* Lowercase Latin letters can be used in the Beta Code (e.g. `a`, `w=`) +* Uppercase Greek letters can be keyed 1. asterisk, 2. breathing, 3. accent, 4. iota subscript, 5. letter (e.g. `*(=|W`) +* Uppercase Greek letters can be keyed 1. asterisk, 2. letter, 3. breathing, 4. accent, 5. iota subscript (e.g. `*W(=|`) + ## Example uses * [https://github.com/perseids-tools/beta-code-js](https://github.com/perseids-tools/beta-code-js)