Tuesday, 17 November 2020

Incorrect implementation of swar chinhas (udatt U+0951, anudatt U+0952, also ँ U+0901) and visarg (U+0903)

Swar chinh -vowel marks  ॑ uddatt and   ॒ anudatt, (called stress marks by Unicode) are Unicode marks used to denote different swars (vowel). They denote inherent characteristic of a vowel and not any 'addition' to it. which means, a vowel with their presence is still one single phonetic unit (Varn) and not more than one. i.e. अ and अ॒ are two different individual vowels just like अ and आ are, it is only that we need two Unicode codes to represent अ॒, while अ and आ requires only one code.


Required behaviour
They being vowel marks should only be associated with vowels. i.e. they should only come after explicit / implicit presence of swar and, that it should not be possible to associate them with non swars like hals (letters with virama, anuswar, visarga), numbers or any symbol etc.

Current Behaviour
Below association is supported currently, which is wrong as swar chinh after non swar is taken as valid sequence.
देव्॑ देव्॒ देव्॒॑ देवः॑ देवं॒ (in last वं॒, its \u0935 \u0902 \u0952 which should not be allowed. on the other hand, व॒ं which is \u0935 \u0952 \u0902, a correct sequence is displayed incorrectly. it should be displayed as वं॒)

Examples where correct sequences display incorrect text and incorrect sequence displays, well, incorrect but correct looking text (so that people may take that route as 'jugad')
देवा॒ः  देवाः॒
देव॑ः  देवः॑

 ँ (0901) also suffers from above problem and should be corrected in similar fashion.

Swar chinha should be allowed before/after ँ (0901) - mark that is used to denote anunasik swar.

One base currently allows both udatt and anudatt to be associated with it. should not be allowed.

in short, instead of swar chinhas being treated as 'last' mark on ANY base, they should be treated as characterisation marks that can only be associated with bases that has presence of swar.


Visarg (ः)
Visarg is like a hal (devoid of swar), it is always preceded by a swar and despite being a separate Varn, it is always displayed along with preceding Varn.

1) It is a separate phonetic unit and therefore should come 'after' previous phonetic unit is fully described. i.e. previous swar, with any/all swar characterisation marks. i.e. देवा॒ः  is correct sequence (displayed incorrectly), to display देवाः॒ , you need to enter incorrect sequence.

2) It can not come after hal. i.e. these should be invalid sequences. -देवंः देव्ः (these sequences, if entered, should be rather displayed with visarg shown hanging separately at the end.)

3) No marks (swar chinh / hal chinh) can come after it (currently, if you enter them, they get attached to same base as that of Visarg)


Resources that explain how Unicode works for our scripts.
1) https://www.tdil-dc.in/index.php?option=com_download&task=showresourceDetails&toolid=1625&lang=en
http://pravin-s.blogspot.com/2014/09/devanagari-script-behaviour-for-hindi.html
2) http://www.unicode.org/versions/Unicode6.1.0/ch09.pdf
3) https://docs.microsoft.com/en-us/typography/script-development/devanagari

No comments:

Post a Comment