The selection should be painted correctly from and including 猫 until and including C, then from right to left for العر.

吾輩は猫で मानक हिन्दीABCالعربية
吾輩は猫で मानक हिन्दीABCالعربية