Arabic text in alert() should appear in RTL by default
When using an alert()-statement in which arabic text is included (like alert("דךגלכחדךלגיכלגדיכ\nלחידליגדלכדגכ\nלחידלגיכ");
) , the alignment of the message will appear in Left-To-Right (LTR), unless you specify the direction in the html-attribute. Chrome detects automatically, that these characters need RTL-direction and shows them accordingly in RTL directly.
Did you set <html dir="rtl">?
The sample above uses hebrew characters, for which the issue occurs as well, due to its RTL-direction.