Sorry for the late followup.
... Thai input method have to distinguish these two: (1) surrounding text is supported by the client but the previous character doesn't exist. (2) surrounding text is not supported by the client.
In the case of (2), Thai input method have to fallback to buffering method (i.e. keep typed characters in preedit area to assure to commit only a valid character sequence).
Jens