I have a Adobe Flex Mobile app displays Thai text, however this is not displaying correctly. While developing the App on my Windows machine and testing using the Adobe Flash Builder mobile emulator, the font/characters look correct.
However when running the app on either the MAC Adobe Flash Builder emulator, the iPhone simulator or on an actual iPhone, the font/characters are incorrect.
First I thought that it was maybe an encoding issue (I am using locale properties files to replace text), so followed instructions at this website Flash Builder, Flex language bundles showing strange symbols. Not utf8 encoded.Sefol however this did not solve the issue.
Looking more closely at the text rendered, it looks as though all of the characters for each word are actually being rendered, but they are just being rendered in correctly. Where as if it was a encoding issue then it would be missing characters completely.
So if you look at the first character, in the correct version it is built up of 3 components. If you look at the second image, you can see that these three components are present but just not all appearing within one character.
Is this a font issue? or is it actually an encoding/rendering issue?
My code for testing this is just a simple label tag
<s:Label text="ชื่อผู้ใช้" fontFamily="Arial" fontSize="12" />
don't exactly know the situation w/fonts on iphones but that doesn't look like "mojibake" (encoding issue) as all the characters are there but the device doesn't know how to handle those "sara" vowels placements & i guess the boxes () indicate no glyphs for the last 2 "mai tho"้ vowels.
its a mismatch w/the font glyphs. on my windows 7 dev box, there are no thai chars in arial font at all, so kind of surprised that it renders correctly for you.
check the device for the available thai fonts & try another font family.
Ok so after doing a bit more of an investigation into the Font being the issue and not the encoding type, it seems as though if I use a specific font which I know has the Thai characters, then they are displayed correctly.
I have embedded the font into the App using the code:
[Embed(source="../assets/Kinnari.ttf", mimeType="application/x-font", embedAsCFF="true", fontFamily="ThaiFont")]
private var ThaiFont:Class;
Then on my UI I have added the font:
<s:Label text="ชื่อผู้ใช้" fontFamily="Arial" fontSize="12" fontFamily="ThaiFont" />
I was able to find this font at a Hawaiian Educational website! Thai fonts :: Thai Language Program, University of Hawai'i, Manoa
Thanks @tooMuchTrouble for your help.