smarter detection and alignment of arabic fields

Fixes #5.