<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ActionScript 2.0 Arabic Parsing v1.1</title>
	<atom:link href="http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/</link>
	<description>UX, AS, Thoughts</description>
	<lastBuildDate>Wed, 28 Jul 2010 15:33:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: xVisage</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-228</link>
		<dc:creator>xVisage</dc:creator>
		<pubDate>Fri, 26 Mar 2010 15:13:48 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-228</guid>
		<description>@Jan

Many thanks to you for your contribution, that was very efficient ..
About the embedFonts condition you find confusing, actually I don&#039;t quite understand why Flash treats embedded fonts differently in terms of character metrics, I found that by try and error, not based on any information regarding Arabic vs. Flash, for example, when I try to detect characters width for wrapping it behaves differently based on embedFonts property, that&#039;s why I do recommend to always embed Arabic Fonts, this way you should get proper Arabic rendering ..
If you can find me an explanation about embedFonts and Arabic glyphs in Flash it would be great ..
Thanks again for your updates to this method :)

@Yousif

This method definitely renders Arabic characters properly on Mac, but I don&#039;t think you can force the embedded YouTube Flash Player to use this method for Arabic rendering, unless you can find a way to load videos directly from YouTube (without using their player), in this case you can build you own player using this method, only by then you can have proper Arabic rendering in your own player

@Salman
@Ammar
@Jan
@Yousif

My apologies for such late reply, it&#039;s true that I have been busy recently ..
I did my best to cover all your issues in &lt;a href=&quot;http://ixd-consultant.com/blog/2010/03/26/actionscript-2-0-arabic-parsing-v1-2/&quot; rel=&quot;nofollow&quot;&gt;&lt;sapn style=&quot;color:rgb(0, 102, 255);&quot;&gt;this&lt;/span&gt;&lt;/a&gt;  new version, you&#039;re still welcome to review and comment on this one</description>
		<content:encoded><![CDATA[<p>@Jan</p>
<p>Many thanks to you for your contribution, that was very efficient ..<br />
About the embedFonts condition you find confusing, actually I don&#8217;t quite understand why Flash treats embedded fonts differently in terms of character metrics, I found that by try and error, not based on any information regarding Arabic vs. Flash, for example, when I try to detect characters width for wrapping it behaves differently based on embedFonts property, that&#8217;s why I do recommend to always embed Arabic Fonts, this way you should get proper Arabic rendering ..<br />
If you can find me an explanation about embedFonts and Arabic glyphs in Flash it would be great ..<br />
Thanks again for your updates to this method <img src='http://ixd-consultant.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>@Yousif</p>
<p>This method definitely renders Arabic characters properly on Mac, but I don&#8217;t think you can force the embedded YouTube Flash Player to use this method for Arabic rendering, unless you can find a way to load videos directly from YouTube (without using their player), in this case you can build you own player using this method, only by then you can have proper Arabic rendering in your own player</p>
<p>@Salman<br />
@Ammar<br />
@Jan<br />
@Yousif</p>
<p>My apologies for such late reply, it&#8217;s true that I have been busy recently ..<br />
I did my best to cover all your issues in <a href="http://ixd-consultant.com/blog/2010/03/26/actionscript-2-0-arabic-parsing-v1-2/" rel="nofollow"><sapn style="color:rgb(0, 102, 255);">this</sapn></a>  new version, you&#8217;re still welcome to review and comment on this one</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yousif Almuzayen</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-227</link>
		<dc:creator>Yousif Almuzayen</dc:creator>
		<pubDate>Fri, 26 Mar 2010 08:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-227</guid>
		<description>Dear sir,
I&#039;ve a weak background about scripts...
The issue I face is I&#039;m a Mac user and the flash player doesn&#039;t support the Arabic words written in flash forms such as YouTube ... etc.

Is this script going to be helpful in this case? and how to use it :$

best regards :)

Yousif</description>
		<content:encoded><![CDATA[<p>Dear sir,<br />
I&#8217;ve a weak background about scripts&#8230;<br />
The issue I face is I&#8217;m a Mac user and the flash player doesn&#8217;t support the Arabic words written in flash forms such as YouTube &#8230; etc.</p>
<p>Is this script going to be helpful in this case? and how to use it :$</p>
<p>best regards <img src='http://ixd-consultant.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Yousif</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-225</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Mon, 22 Mar 2010 21:52:22 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-225</guid>
		<description>Ahmed, I tried to contact you via email. Maybe you are too busy, so I will post my investigations here as comment.

First of all: Thank you very much for this great AS2 class. I do not know anything about Arabian characters or grammar, but I think I found bugs and possible enhancements:

1) Fix double line breaks (@Ammar: That could fix your problems)

Add 
Line input = input.split(&quot;\r\n&quot;).join(&quot;\n&quot;);
after the comment &quot;// strip hard lines-breaks&quot; 

2) Fix wrong line breaks (Ahmed: I sent you a test fla via email):

Replace:
if (temp._width&lt;tag._width-tagFormat.leftMargin-tagFormat.rightMargin) {
By:
if (temp._width&lt;tag._width-(tagFormat.leftMargin ? tagFormat.leftMargin : 0)- (tagFormat.rightMargin ? tagFormat.rightMargin : 0)) {

3) Improve &quot;hasDigitsOrLatin&quot;-loop:

Add a &quot;break&quot; command when a latinChars was found (just for performance).

----

Two thinks I am confused about:

1) There are some if-Statements like &quot;if (tag.embedFonts) { ...&quot;: I do not understand why embedded fonts should be processed in a different way than not-embedded text formats. In my tests with NOT-embedded text formats I replaced all if conditions with true (like &quot;if (true &#124;&#124;tag.embedFonts) {&quot;) to handle NOT-embedded text format like the embedded ones (otherwise the algorithm did not work properly for me).

2) What about upper case letters in the definition: 
var latinChars:String = &quot;abcdefghijklmnopqrstuvwxyz1234567890&quot;?
The latinChars string is used with indexof and, imho, indexof is case sensitive and I do not see any reason why lower case latin characters should differ from upper case ones.

  Jan</description>
		<content:encoded><![CDATA[<p>Ahmed, I tried to contact you via email. Maybe you are too busy, so I will post my investigations here as comment.</p>
<p>First of all: Thank you very much for this great AS2 class. I do not know anything about Arabian characters or grammar, but I think I found bugs and possible enhancements:</p>
<p>1) Fix double line breaks (@Ammar: That could fix your problems)</p>
<p>Add<br />
Line input = input.split(&#8220;\r\n&#8221;).join(&#8220;\n&#8221;);<br />
after the comment &#8220;// strip hard lines-breaks&#8221; </p>
<p>2) Fix wrong line breaks (Ahmed: I sent you a test fla via email):</p>
<p>Replace:<br />
if (temp._width&lt;tag._width-tagFormat.leftMargin-tagFormat.rightMargin) {<br />
By:<br />
if (temp._width&lt;tag._width-(tagFormat.leftMargin ? tagFormat.leftMargin : 0)- (tagFormat.rightMargin ? tagFormat.rightMargin : 0)) {</p>
<p>3) Improve &quot;hasDigitsOrLatin&quot;-loop:</p>
<p>Add a &quot;break&quot; command when a latinChars was found (just for performance).</p>
<p>&#8212;-</p>
<p>Two thinks I am confused about:</p>
<p>1) There are some if-Statements like &quot;if (tag.embedFonts) { &#8230;&quot;: I do not understand why embedded fonts should be processed in a different way than not-embedded text formats. In my tests with NOT-embedded text formats I replaced all if conditions with true (like &quot;if (true ||tag.embedFonts) {&quot;) to handle NOT-embedded text format like the embedded ones (otherwise the algorithm did not work properly for me).</p>
<p>2) What about upper case letters in the definition:<br />
var latinChars:String = &quot;abcdefghijklmnopqrstuvwxyz1234567890&#8243;?<br />
The latinChars string is used with indexof and, imho, indexof is case sensitive and I do not see any reason why lower case latin characters should differ from upper case ones.</p>
<p>  Jan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ammar Harfoush</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-224</link>
		<dc:creator>Ammar Harfoush</dc:creator>
		<pubDate>Mon, 22 Mar 2010 17:53:57 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-224</guid>
		<description>ok I managed to find a work around which seems to be working till now

seems 1 new line in my input produces &quot;\r\n&quot;
which while being split each becomes a br and results in 2 newlines in flash.

so I just removed one of the joins and now it works!

input = input.split(&quot;\r&quot;).join(&quot;&quot;);
and leave \n alone</description>
		<content:encoded><![CDATA[<p>ok I managed to find a work around which seems to be working till now</p>
<p>seems 1 new line in my input produces &#8220;\r\n&#8221;<br />
which while being split each becomes a br and results in 2 newlines in flash.</p>
<p>so I just removed one of the joins and now it works!</p>
<p>input = input.split(&#8220;\r&#8221;).join(&#8220;&#8221;);<br />
and leave \n alone</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ammar Harfoush</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-223</link>
		<dc:creator>Ammar Harfoush</dc:creator>
		<pubDate>Mon, 22 Mar 2010 17:20:07 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-223</guid>
		<description>hey man, it works perfectly with the database, just one thing.
1 newline does 3 newlines.

didn&#039;t really get what was happening in your function, but tried to comment:
input = input.split(&quot;\n&quot;).join(&quot;&quot;);
input = input.split(&quot;\r&quot;).join(&quot;&quot;);

which fixed it but messed everything else!

so any idea?</description>
		<content:encoded><![CDATA[<p>hey man, it works perfectly with the database, just one thing.<br />
1 newline does 3 newlines.</p>
<p>didn&#8217;t really get what was happening in your function, but tried to comment:<br />
input = input.split(&#8220;\n&#8221;).join(&#8220;&#8221;);<br />
input = input.split(&#8220;\r&#8221;).join(&#8220;&#8221;);</p>
<p>which fixed it but messed everything else!</p>
<p>so any idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: salman</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-220</link>
		<dc:creator>salman</dc:creator>
		<pubDate>Wed, 17 Mar 2010 16:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-220</guid>
		<description>First of All, Thanks for this great source. However I am facing wrapping problem in full screen mode! It shows starting words of sentence in 2nd line and in case of long test (in full screen) wrapping issue is remain same as happens in flash normally. Any Idea Why it is behave like this.

FYI: I&#039;m reseting width of my text field for full screen thru AS. However your script works fine normal mode.</description>
		<content:encoded><![CDATA[<p>First of All, Thanks for this great source. However I am facing wrapping problem in full screen mode! It shows starting words of sentence in 2nd line and in case of long test (in full screen) wrapping issue is remain same as happens in flash normally. Any Idea Why it is behave like this.</p>
<p>FYI: I&#8217;m reseting width of my text field for full screen thru AS. However your script works fine normal mode.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xVisage</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-219</link>
		<dc:creator>xVisage</dc:creator>
		<pubDate>Tue, 09 Mar 2010 22:11:36 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-219</guid>
		<description>@Rabah

I think it&#039;s a Font issue, I use unicode charts for &lt;a href=&quot;http://www.unicode.org/charts/PDF/UFE70.pdf&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;color:#0066FF&quot;&gt;Arabic Presentation Forms-B&lt;/span&gt;&lt;/a&gt; (glyphs from FE70 to FEFE according to the Unicode Standard 5.2), may be this is your issue, can you try one of &lt;a href=&quot;http://www.arabeyes.org/resources.php&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;color:#0066FF&quot;&gt;these&lt;/span&gt;&lt;/a&gt; fonts and tell me if you still have the same bug? &lt;em&gt;(those fonts has full representation Form-B)&lt;/em&gt;
Thank you for your compliment :)</description>
		<content:encoded><![CDATA[<p>@Rabah</p>
<p>I think it&#8217;s a Font issue, I use unicode charts for <a href="http://www.unicode.org/charts/PDF/UFE70.pdf" rel="nofollow"><span style="color:#0066FF">Arabic Presentation Forms-B</span></a> (glyphs from FE70 to FEFE according to the Unicode Standard 5.2), may be this is your issue, can you try one of <a href="http://www.arabeyes.org/resources.php" rel="nofollow"><span style="color:#0066FF">these</span></a> fonts and tell me if you still have the same bug? <em>(those fonts has full representation Form-B)</em><br />
Thank you for your compliment <img src='http://ixd-consultant.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xVisage</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-218</link>
		<dc:creator>xVisage</dc:creator>
		<pubDate>Tue, 09 Mar 2010 21:53:54 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-218</guid>
		<description>@Khaled

Well, it&#039;s not a patch that affects every object, also not quite a library for flash ..
Basically it&#039;s a String Parsing method &lt;em&gt;(custom AS based function)&lt;/em&gt;, which analyze and re-order Arabic glyphs in a proper manner with correct rendering on windows, mac and linux, furthermore, it supports custom fonts ..
Regular TextField in Flash does not understands right-to-left languages, so it can not map custom fonts, no word wrapping and even breaks the string on mac machines ..
I did not hack into Flash or use third-party techniques to solve this, all I did is simply instruct Flash to render Arabic language manually using ActionScript by finding and replacing Arabic characters with its correct forms from unicode charts, my method has nothing to do with any special features added to ActionScript (since version 1.0) or to Flash Player (since version 5), it&#039;s just a workaround ..
I left my solution absolutely free and open for anyone who can understand my approach and build similar methods for other right-to-left languages, even update my own for better usage ..
I hope I&#039;ve helped understanding what this is all about :)</description>
		<content:encoded><![CDATA[<p>@Khaled</p>
<p>Well, it&#8217;s not a patch that affects every object, also not quite a library for flash ..<br />
Basically it&#8217;s a String Parsing method <em>(custom AS based function)</em>, which analyze and re-order Arabic glyphs in a proper manner with correct rendering on windows, mac and linux, furthermore, it supports custom fonts ..<br />
Regular TextField in Flash does not understands right-to-left languages, so it can not map custom fonts, no word wrapping and even breaks the string on mac machines ..<br />
I did not hack into Flash or use third-party techniques to solve this, all I did is simply instruct Flash to render Arabic language manually using ActionScript by finding and replacing Arabic characters with its correct forms from unicode charts, my method has nothing to do with any special features added to ActionScript (since version 1.0) or to Flash Player (since version 5), it&#8217;s just a workaround ..<br />
I left my solution absolutely free and open for anyone who can understand my approach and build similar methods for other right-to-left languages, even update my own for better usage ..<br />
I hope I&#8217;ve helped understanding what this is all about <img src='http://ixd-consultant.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Khaled Khalil</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-217</link>
		<dc:creator>Khaled Khalil</dc:creator>
		<pubDate>Mon, 08 Mar 2010 18:02:14 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-217</guid>
		<description>i am not into flash at all, so i am very sorry that i didn&#039;t understand what is this all about.
can you tell me, in layman term, if this is some workaround to get flash objects render Arabic sanely, i mean a patch users do once that affects every object executed, or it is a library for flash developers to include in their projects so that it will be able to display Arabic scripts correctly ?

if the former, can you explain for dumb user, in details, what to do ?

many thanks in advance</description>
		<content:encoded><![CDATA[<p>i am not into flash at all, so i am very sorry that i didn&#8217;t understand what is this all about.<br />
can you tell me, in layman term, if this is some workaround to get flash objects render Arabic sanely, i mean a patch users do once that affects every object executed, or it is a library for flash developers to include in their projects so that it will be able to display Arabic scripts correctly ?</p>
<p>if the former, can you explain for dumb user, in details, what to do ?</p>
<p>many thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rabah</title>
		<link>http://ixd-consultant.com/blog/2010/01/26/actionscript-2-0-arabic-parsing-v1-1/comment-page-1/#comment-214</link>
		<dc:creator>Rabah</dc:creator>
		<pubDate>Mon, 01 Mar 2010 11:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://ixd-consultant.com/blog/?p=241#comment-214</guid>
		<description>Thanks so much for this post your really brilliant.

by the way I noticed a bug with the number ٤ and ٦ when I write them in arabic in the xml and when I replaced them with 4 &amp; 6 it&#039;s worked I&#039;m just telling you because u did a great job and you should know if there is any bug.

Thanks again :D</description>
		<content:encoded><![CDATA[<p>Thanks so much for this post your really brilliant.</p>
<p>by the way I noticed a bug with the number ٤ and ٦ when I write them in arabic in the xml and when I replaced them with 4 &amp; 6 it&#8217;s worked I&#8217;m just telling you because u did a great job and you should know if there is any bug.</p>
<p>Thanks again <img src='http://ixd-consultant.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
