Hiya,
Trying to do a Tamil conversion of one of our games, but some of the characters are coming out wrongly. When pasting certain words into Unity (e.g. நேர), Unity reverses some of the letters. If you copy and paste them back into a standard text editor they come out fine. Just seems to be a bug of how Unity is treating the letters.
Any help would be greatly appreciated as a bit of a show stopper!
Cheers,
Chris
So, I copied that string and pasted it into a text file. I saved that text file as UTF-16. If I do a hex dump of that file I get:
graham$ od -x tamil.txt
0000000 fffe a80b c70b b00b
Ignore the byte-order-mark, and look at the last 3 columns. These tell me that the sequence of glyphs starts with U+0x0BA8, which is the ந character in Tamil. Now, in your forum post, this glyph appears in the middle of the string. So, there must be some rules about Tamil language that changes the order in which glyphs are displayed. I don’t know what these rules are, but guess they are encoded in the font’s GSUB or GPOS tables. GSUB controls the way sequences of glyphs are displayed, so, the f-followed-by-i sequence in some fonts can be swapped out for a single fi ligature (U+FB01). GPOS controls the spacing of glyphs, so can move sequences together/apart, so is another way to display fi using two glyphs. Some fonts display accented characters by rendering the character, and then the accent having moved the accent backwards to appear over the character. Anyways, this is just “knowledge sharing”. Unity does not process the GPOS or GSUB tables, which is why the order of your string in Unity is the order of the glyphs in the string. You may need to implement some string munging code, either offline, or in your script that takes strings, and orders the characters correctly knowing that Unity will display them in the order they are in the string. (Ashkan did this for Farsi, which has complex rules for the casing of characters. In Farsi there are different glyphs used when a letter appears at the start, end, or middle of a word. The GSUB table usually handles this.)
Hi,
I had a similar problem with hindi and have worked out a solution given in this link. You can use a similar approach for tamil and share the results with us.
I’m running into this exact problem, has anyone created/found a solution for this?
And, while we’re at it, why hasn’t unity fixed this yet?
Please check my answer for this issue
@nareshkumaryakkala
Could you provide me your mailid or else please mail to vasanthbalaji88@gmail.com, How to use your asset from that link to display tamil characters in the UI.
this asset fix my problem now my game can be in Tamil