I use XeLaTeX and XePersian to write Persian documents. Unfortunately, some frequently used fonts in Persian does support important characters like ی so I should replace them with Arabic counterparts like ي to get the expected result. Some others support it, so I should revert the changes.
I can not replace every single character of ی with ي, because in this way, my Persian macros and localised XePersian commands will fail, and if I do this manually, with a change of font I will have to do this again. For sure this can be fixed in the font-level, but I can not edit the font. :-/
My question is that is it possible to replace ی by ي in macro level?
I tried this, but it didn't work:
\documentclass[14pt,a4paper]{article}
\usepackage[localised]{xepersian}
\settextfont{Arial}
\defی{ي}
\begin{document}
میشود.
% added to show the problem with the localised commands
% even without it, it won't compile when placing replace commands
%before including xepersian
\سطرجدید %it means new line
\newline
\end{document}