This is me editing ArabXeTeX input, which renders to the PDF correctly. Here is the same text in Mellel, which also renders it correctly: