Update 2010-04-26: I’ve also fixed the problem, that Latin characters at the beginning are ignored (see ActionScript 2: Bugfixes in “ActionScript 2.0 Arabic Parsing v1.2” – Part 2).
I’ve just reviewed the new version 1.2 of the “Arabic parser” for ActionScript 2. Among some bugfixes, the library now adds a rudimentary support for arabic input fields. The bugs I have found in version 1.1 (see my post “ActionScript 2: Create dynamic text fields with Arabic texts”) are all fixed with the new version.
Altogether, the new version works quite good but I found (and fixed) the following three bugs:
- Bug 1: If the last two or more words only contain Latin characters this words are not rendered in correct order.
- Bug 2: Brackets, punctuation marks or other non-Latin characters that are connected at the end of a Latin word get lost.
- Bug 3: If the text field does not embed the font the characters are ordered in the wrong way.
I’ve modified the original example for arabic parsing 1.2 (http://ixd-consultant.com/blog/2010/03/26/actionscript-2-0-arabic-parsing-v1-2/) to demonstrate the problems (download):
The example above shows that
- “HELLO WORLD” is not rendered in correct order,
- the closing brackets are missing, e.g. on the right side of “Loch Ness monster” and
- after clicking “toggle embed” all characters are shown in wrong order.
I fixed the bugs in the class com.xvisage.utils.StringUtils and republished the example. The result looks as follows (download):
In the above example there are still problems when the font is not embedded: A few characters are not rendered properly, e.g. in the second line the word on the right side of the brackets containing “plesiosaurs”. Curiously selecting the characters with the mouse fixes the problem (can be tested in the above example). Imho, this could be a bug in the Flash player and not an issue caused be the arabic parser.
Here are the download links for the examples above (Flash CS3):