Khmer Unicode
Khmer that looks right on your screen and breaks on somebody else’s.
The fault you cannot see
A Khmer syllable is a base consonant, then any subscripts, then the vowels and signs, in that order. Type them in a different order and most fonts quietly draw the same thing anyway, so the text looks perfect to whoever wrote it.
Then it reaches a different renderer — a phone, a PDF, a search index, a database sort — and the marks land in the wrong places, or the word simply stops matching itself. There is nothing to see, which is exactly why the fault survives for years.
Where it comes from
Rarely from typing. A Khmer keyboard produces the right order by itself. It comes from converted legacy documents, from text pasted out of Word or a PDF, from hand-edited HTML, and from copying a single character out of a web page when what was needed was two.
The last one is worth knowing about: a subscript is an invisible marker followed by a consonant. Copy only the visible half and you have half a subscript, which is a different string that happens to look similar.
What is checked
Subscript markers with nothing after them or with something that cannot be a subscript. Vowels with nothing to attach to, doubled vowels, and vowels written before the subscript that belongs to the same syllable. Diacritics with no syllable to sit on. Zero-width and invisible characters that arrive with pasted text.
It also notes when Khmer digits ០–៩ and Arabic digits 0–9 are mixed in the same text. They are different characters, so a number written one way will never match the same number written the other — which is how a phone number in a form fails to find its own record.
What it does not check
Spelling. Text with no errors here can still be full of them; a clean result means the characters are in an order every renderer will agree on, not that the words are right.
It also does not check grammar, word breaks or the zero-width spaces Khmer uses between words — those are editorial questions rather than structural ones, and a tool that guessed at them would be wrong more often than it helped.

