to illustrate the problem better: 1- under gnome (other desktop environments should work too, if they implement standard Farsi/Persian keyboard layout), from settings > Region & Language > add "Persian" input source 2- switch to "Persian" input source 3- open firefox, go to https://unicode-table.com and click on the search bar, then press: Alt+d and then Enter to see the code point for the typed character 4- set the gnome input source back to English 5- open Emacs, run M-x set-input-method RET farsi-isiri-9147 RET 6- press C-q Alt-d and compare the typed character (which is a latin character with diacritics) with what you've got in firefox (which was a Farsi/Arabic Character) again, i used Alt-d as an example here, you can see a complete list in attached images in the original email. (as another example try Alt-h)