This class can be used to convert Arabic text to Unicode for rendering purposes.
The class takes as input Arabic text encoded using Windows-1256 character set and performs Arabic glyph joining to output a string encoded using UTF-8.
The output string is no longer logically arranged, but laid out in a visual order to be read properly when formatted with a simple Unicode rendering methods used by the GD or UFPDF libraries. Such libraries do not handle basic connecting glyphs of Arabic language yet, but rather output all standalone glyphs in left to right direction.
This class is part of Khaled Al-Shamaa project for PHP and Arabic language: