These scripts transcode strings from Legacy khmer fonts to Unicode and vice versa. You can see them in action at http://www.selapa.net/khmerfonts/
- Search and replace from the database
- Recompose characters
- Transcode other characters * Ligatures get separated into characters * Ornaments get enclosed between 0x91 and 0x92 * Khmer characters missing in Unicode get enclosed between 0x86 and 0x87 * Characters missing in the legacy font get enclosed between 0x96 and 0x97
- Reorder characters according to Unicode order
This code is translated to PHP from KhmerOS khmerconverter Python software
- Reorder characters according to visual order
This code is translated to PHP from KhmerOS khmerconverter Python software - Search and replace from the database
- Transcode characters
- Decompose composite characters if necessary * Missing characters get enclosed between 0x96 and 0x97
- Apply ligatures if present in the font
- Refine the database (some font mappings aren't yet correct)
- Word-breaking
- Transcode documents with multiple fonts