From the HTML sample you sent I got correct result. See attached.

(I only changed content=”charset=UTF-8″ to content=”text/html; charset=UTF-8″)

If it does not work for you, try to add dir=”rtl” or dir=”ltr” attribute to tag. It is something wrong on you side with initial conditions for Arabic ligaturizing – probably there are CSS styles impact it.