Let's see if my person is able to draw down a look up pattern for a letter string roman to Khmer.
First letter "1":
if | then |
a/A | អ |
ā/Ā | អា |
i/I | ឥ |
ī/Ī | ឦ |
u/U | ឧ |
...o/O | ...ឱ |
k/K | ក |
G/g | គ |
...ḷ/Ḷ | ...ឡ |
next "2" (following sign) would ask whether a consonant or vowel if previous was a consonant
if "1" ក-ឡ and "2" k-ḷ | add footer value of "2" ្+ក-ឡ |
if "1" footer value of ក-ឡ and "2" k-ḷ | add footer value of "2" ្+ក-ឡ |
if "1" អ-ឱ and "2" k-ḷ | add ក-ឡ |
if "1" ក-ឡ or footer value, and "2" a | - |
if "1" ក-ឡ or footer value, and "2" ā,i,ī,u,ū,e,o | add ា ិិ ីី ុុ ូូ េ ោ |
if "1" ក-ឡ or footer value or ិិ ុុ ោ[1], and "2" ṃ/ṁ/ŋ | add ំ |
This pattern could go on till the end of the string. Independent vowel do only accrue at the beginning and have usually no footer in Pali (when right, Nyom
Cheav Villa ?), are standing alone, aside of
A (
អ) which might, when long
Ā have the vowel
ā (
ា) included:
អា.
If a consonant follows another consonant the footer value sign
្្ is added (transforming the next consonant into a footer).
There might be a more easier pattern, follow the range of signs.
U+1780-179C + 179F-17A1 = consonants
if used as footer: 17D2 added before.
U+17A2 (actually 17A4 would be right, but usually used 17A2+17B6), 17A5-17A7, 17A9, 17AF, 17B1 = independent vowels
U+17B6-17B8, 17BB, 17BC, 17C1, 17C4 = vowels
Nikahit (the mystic "am"/"ang" sign) = 17C6
Maybe good to add the Unicode no. in the
akkharakrama (done ✔)
Maybe a pattern that simply replaces at first place and then makes the footer check to add the footer value in between is easier to handle.
There is a traditional exception as well:
bb would not be written
ព្ព but
ព្វ bv, a "bug" in Nyom
Vinodh s script (as probably relaying on western sources) but actually a traditional "Sanskrit-baggage" probably.
* Johann : just saw that vowels are displayed double here