There are two problems: one in the output system (font renderer), which is not Thai, and one in the input system, which generated this text in the first place.
If you did your homework, you would know that mai tho and maitaikhu (UniCode names) are what UniCode is called Non Spacing (NSM) markers. This means that the font renderer should not move to the next cell of a character when that character is displayed.
To avoid the clutter you see above, the Thai API Consortium (TAPIC) made the WTT 2.0 standard, which describes how the font rendering algorithm should handle the Thai letter order when it receives it as an input, and also how the input method should allow enter these characters if you are trying to enter them.
Standardization and implementation of the Thai language review
libthai includes both input and output methods.
thaicheck is a small program that can detect letter sequence problems and fix them.
By the way, you cannot have the sequence (word) do dek, mai tho and maitaikhu; input sequence is noise.
Keep in mind that some editors have violated input methods that allow you to print multiple NSMs that cannot be combined, but the output method will only display legal sequences; the result is an invalid input line that looks normal to the user on his system.
koan Aug 19 '11 at 10:19 2011-08-19 10:19
source share