So I'm trying to convert certain text encoded in legacy encoding to Unicode. For that I've made a script to search and replace the characters. The conversion is mostly fine except for certain replacements. I deal with Indic text. Suppose I'm converting The legacy text
@ = ଅ, e = ର, þ = ୍+U200C , i = ସ
It should convert to ଅର୍ସ but instead shows something else. Any further ର୍ that I type gets immediately converted too. When I copy this text and paste anywhere else it appears okay. Even when I switch to a fresh inDesign document and type the same thing in Unicode it appears fine. Interestingly this happens on only 2 fonts, if I select other fonts the text shows up normal. Unfortunately these two fonts are my staple and author of one is retired and other is a free one.
The image shows: Top- Normal text that appears when I type or copy in a fresh document, Middle- Jumbled up text when I run the script, Lower- the legacy text is selected