Romenagri Transliteration System

A formal specification of the Unicode Devanagari ↔ ACII ↔ Romenagri pipeline, with Sanskrit and Vedic extensions and the nukta layer.

Devanagari through programs

Romenagri carries Hindi and Sanskrit text through three layers: Unicode Devanagari, an 8-bit encoding called ACII, and plain ASCII letters, which programs, shell tools and sed scripts can handle. It is the transliteration system under Hindawi, whose language styles are built on it. Its sources are the Romenagri/ directory of the hindawiai/chintamani repository.

Unicode —uni2acii→ ACII —acii2rmn→ Romenagri —rmn2acii→ ACII —acii2uni→ Unicode

Try it

The box runs romenagri.js, a port of the four converters whose tables are generated from the headers of Romenagri/. It is not the production C code: build_site.py --check compares it with the compiled C programs and with the Python models of the tests. Every stage of the chain is shown, so that each can be inspected.

Direction
Form of the nukta letters at the Unicode end (what this is)

What is here

The nukta layer in a paragraph

Unicode has eleven letters with a nukta that are one code point each: ऩऱऴक़ख़ग़ज़ड़ढ़फ़य़. ACII writes every one of them as two bytes, the consonant and the nukta (E9). Only two of the eleven had a byte of their own in the table; for the other nine uni2acii wrote the low byte of the code point, so that the cluster ड़्व, typed with the single code point U+095C, came back as व alone. The layer that the third patch adds has three parts, which are kept apart: a rule (a letter with a nukta is a consonant and a nukta, always), a form (whether the Unicode end writes such a letter as one code point or as two: asis, the default, nfc or nfd, the user's choice) and a warning (off unless asked for) for the characters that have no ACII byte.

Author’s note

This system was developed primarily to support identifiers, string literals and comments in programming languages that contain Devanagari; the linguistic layer was secondary. The danda (। U+0964 and ॥ U+0965) was given a Romenagri spelling for practical use inside source code, and what to do about it remains a task for later: the intention is to retire the special treatment of the danda and to leave punctuation to the host language. The danda says what the converters do with it today.

This note was carried over from an earlier draft of this site. The author has not yet confirmed its wording.

How the pages were made

The tables on these pages are read from unicode.h, acii.h, aciihin.h and nukta.h, and every output shown (the bytes, the Romenagri, the crashes, the warning) was written by the compiled C programs when romenagri-site/build_site.py built the site. Nothing in a table was typed in. Documents says how to rebuild and check it.