metadata {

authority_id: iso
id: 15919-2001
language: iso-639-2:pli
source_script: Sinh
destination_script: Latn
name: "ISO 15919:2001 Information and documentation -- Transliteration of Devanagari and related Indic scripts into Latin characters (Pali in Sinhala)"
url: https://www.chatranjali.fr/Scripts/Standards/ISO15919.pdf
creation_date: 2001
adoption_date: 2001
description: |
  Script conversion is often required for documents such as historical and literary texts, geographical texts (including
  maps and atlases), bibliographies, catalogues, lists and passports (and other identification documents).

  Text in Devanagari script or other Indic scripts sometimes needs to be shown in Latin script, where users, or
  equipment that they are using, cannot read or write the text

  This International Standard applies to transliteration of Devanagari, and to Indic scripts related to Devanagari,
  independent of the period in which it is or was used.

notes:

  - All transliterations made using this International Standard shall be case-insensitive.
  - Inherent a with a consonant shall always be transliterated.
  - anusvara (including Vedic anusvara) shall be transliterated as ṁ
  - candrabindu shall be transliterated as m̐
  - When m̐, ṃ or ṁ are associated with a vowel, they shall be placed after the vowel. When m̐ is associated
    with a semivowel, it shall be placed before the semivowel.
  - Latin punctuation signs and Hindu-Arabic numerals shall remain unchanged in transliteration.
    Indic punctuation is outside the scope of this International Standard.
  - The Vedic accent Udatta shall be transliterated as an acute accent over the transliterated vowel, and the
    independent Svarita as a grave accent over the transliterated vowel. In the case of the digraphs ai, au, the accent
    shall be attached to the second vowel.
  - |
    A colon: before a Latin character shall be used to resolve ambiguity. Some normative cases are as
    follows.
     -  :’ for avagraha in modern text. (The apostrophe in modern text remains unchanged in accordance with previous rule.
  - If a character in an Indic script is defined in such a way as to be equivalent to another character in any
    script, where the second character has a transliteration in this International Standard, then the first character shall
    be transliterated in the same way as the second character.
  - When the half-nasal in Telugu script is used for modern nasalization in writing Hindi or
    any other language, it shall be transliterated as a tilde above the transliterated vowel. In the case of the digraphs ai,
    au, the tilde shall be attached to the second vowel
  - Where it is desired to show the Vedic accent Anudatta, it should be transliterated as an underscore. In the case of
    the digraphs ai, au, both Latin vowels should be underscored.
    Where word boundaries are not shown in the original text (as happens commonly in Sanskrit) and a word ends in a
    consonant, the transliteration should show word division by a space; but when phonological processes result in two
    words sharing a common vowel, no attempt should be made to separate them. This will require a good knowledge
    of the language in question.

}

tests {

test "තෙන සමයෙන බුද්‌ධො භගවා වෙරඤ්‌ජායං විහරති නළෙරුපුචිමන්‌දමූලෙ මහතා භික්‌ඛුසඞ්‌ඝෙන සද්‌ධිං", "taena samayaena baudadhao bhagavaā vaerañajaāyaṁ vaiharatai naḷaeraupaucaimanadamaūlae mahataā bhaikakhausaṅaghaena sadadhaiṁ"
test "පඤ්‌චමත්‌තෙහි භික්‌ඛුසතෙහි. අස්‌සොසි ඛො වෙරඤ්‌ජො බ්‍රාහ්‌මණො", "pañacamatataehai bhaikakhausataehai. asasaosai khao vaerañajao baraāhamaṇao"
test "අථ ඛො වෙරඤ්‌ජො බ්‍රාහ්‌මණො යෙන භගවා තෙනුපසඞ්‌කමි;", "atha khao vaerañajao baraāhamaṇao yaena bhagavaā taenaupasaṅakamai;"
test "උපසඞ්‌කමිත්‌වා භගවතා සද්‌ධිං සම්‌මොදි.", "upasaṅakamaitavaā bhagavataā sadadhaiṁ samamaodai."
test "නිබ්‌භොගො භවං ගොතමො", "naibabhaogao bhavaṁ gaotamao"
test "අකිරියවාදො භවං ගොතමො", "akairaiyavaādao bhavaṁ gaotamao"
test "උච්‌ඡෙදවාදො භවං ගොතමො", "ucachaedavaādao bhavaṁ gaotamao"
test "ජෙගුච්‌ඡී භවං ගොතමො", "jaegaucachaī bhavaṁ gaotamao"
test "අහොසි අසල්‌ලීනං, උපට්‌ඨිතා සති අසම්‌මුට්‌ඨා‍", "ahaosai asalalaīnaṁ, upaṭaṭhaitaā satai asamamauṭaṭhaā"
test "අත්‌ථි ඛ්‌වෙස, බ්‍රාහ්‌මණ, පරියායො යෙන මං පරියායෙන සම්‌මා වදමානො වදෙය්‍", "atathai khavaesa, baraāhamaṇa, paraiyaāyao yaena maṁ paraiyaāyaena samamaā vadamaānao vadaeya"

}

stage {

# CHARACTERS
parallel {

  sub "අ", "a"
  sub "ආ", "ā"
  sub "ඇ", "æ"
  sub "ඈ", "ǣ"
  sub "ඉ", "i"
  sub "ඊ", "ī"
  sub "උ", "u"
  sub "ඌ", "ū"
  sub "ඍ", "ṛ"
  sub "ඎ", "ṝ"
  sub "ඏ", "ḻ"
  sub "ඐ", "ḹ"
  sub "එ", "e"
  sub "ඒ", "ē"
  sub "ඓ", "ai"
  sub "ඔ", "o"
  sub "ඕ", "ō"
  sub "ඖ", "au"

  sub "ා", "ā"
  sub "ැ", "æ"
  sub "ෑ", "ǣ"
  sub "ි", "i"
  sub "ී", "ī"
  sub "ු", "u"
  sub "ූ", "ū"
  sub "ෘ", "ṛ"
  sub "ෲ", "ṝ"
  sub "ෟ", "ḻ"
  sub "ෳ", "ḹ"
  sub "ෙ", "e"
  sub "ේ", "ē"
  sub "ෛ", "ai"
  sub "ො", "o"
  sub "ෝ", "ō"
  sub "ෞ", "au"

  # II. Consonants (see Note 2)
  # Gutturals  క ఖ గ ఘ ఙ
  sub "ක", "ka"
  sub "ඛ", "kha"
  sub "ග", "ga"
  sub "ඝ", "gha"
  sub "ඞ", "ṅa"
  sub "ඟ", "ṅga"

  # Palatals చ ఛ జ ఝ ఞ
  sub "ච", "ca"
  sub "ඡ", "cha"
  sub "ජ", "ja"
  sub "ඣ", "jha"
  sub "ඤ", "ña"
  sub "ඦ", "ñja"

  # Cerebrals ట ఠ డ ఢ ణ
  sub "ට", "ṭa"
  sub "ඨ", "ṭha"
  sub "ඩ", "ḍa"
  sub "ඪ", "ḍha"
  sub "ණ", "ṇa"
  sub "ඬ", "ṇḍa"

  # Dentals త థ ద ధ న
  sub "ත", "ta"
  sub "ථ", "tha"
  sub "ද", "da"
  sub "ධ", "dha"
  sub "න", "na"
  sub "ඳ", "nda"

  # Labials ప ఫ బ భ మ
  sub "ප", "pa"
  sub "ඵ", "pha"
  sub "බ", "ba"
  sub "භ", "bha"
  sub "ම", "ma"
  sub "ඹ", "mba"

  # Semivowels య ర ల వ
  sub "ය", "ya"
  sub "ර", "ra"
  sub "ල", "la"
  sub "ළ", "ḷa"
  sub "ව", "va"

  # Sibilants శ ష స హ
  sub "ශ", "śa"
  sub "ෂ", "ṣa"
  sub "ස", "sa"

  # Aspirate
  sub "හ", "ha"

  sub "ෆ", "fa"

  # Chandrabindu
  sub "ઁ", "m̐"

  # Bisarga
  sub "ඃ", "ḥ"

  # Anusvāra
  sub "ං", "ṁ"

  # numbers

  sub "\u0DE6", "0"
  sub "\u0DE7", "1"
  sub "\u0DE8", "2"
  sub "\u0DE9", "3"
  sub "\u0DEA", "4"
  sub "\u0DEB", "5"
  sub "\u0DEC", "6"
  sub "\u0DED", "7"
  sub "\u0DEE", "8"
  sub "\u0DEF", "9"

  # semivowel chandrabindu rule

  # Semivowels య ర ల వ
  sub "යઁ", "m̐ya"
  sub "රઁ", "m̐ra"
  sub "ලઁ", "m̐la"
  sub "ළઁ", "m̐ḷa"
  sub "වઁ", "m̐va"

  sub "\u09CD", "" # Used for joining
  sub "‍", "" # Used for joining
  sub "‌", "" # Used for non joining
  sub "්", "" # virama
}

compose

}