Thai is a special language. You can write vowels (total 32), as in any other language immediately after the consonant, or IN FRONT, or on it, or on it (well, only a short and long “u” sound can go down, but in any case ...).
In addition, there are other modifiers (4-tone markers, ga-run, may-tai-ku and others) that can enter the TOP of an existing vowel!
For instance:
ที่ดีที่สุด (the best)
As you can see, if I try to print it in a monospaced font, the "real length" will be 5 characters, but all strlen UTF-8 procedures will return 11 characters to me - this is ONLY CORRECT, but I need to know the "actual space", which the line will use on-screen / on the printer when printing a monospace.
Of course, a simple solution would be to list all the special characters that may be at the top or bottom of the word, and remove them from the total.
Since I'm not sure that I can find all the special characters, is there already a regular program in any language so that I can translate it into Delphi?
thank
source
share