Is anybody working with Arabic?

Klaus on-rev klaus at
Wed Sep 1 08:14:41 EDT 2010

Hi Lars, Du alter Globetrotter :-)

> Thanks Richmond and Mark for the tips and advice.
> Both were beyond my abilities at this time, but I appreciate it anyway.
> For now I'll stick with my workarounds, one of which is trying to make sure that empty lines are never created in the custom property the first place. If that doesn't succeed, there is always:
> repeat with i = 1 to the num of lines in tData
>  if line i in tData = empty then delete line i in tData
> end repeat

when deleting lines in data, you should start from the END of the data like:
repeat with i =  the num of lines of tData DOWN to 1
   if line i of tData = empty then 
      delete line i of tData
  end if
end repeat

> Obviously slower than "filter without empty" but the content of that custom property won't be large enough to make it noticable. By the way - I never understood why this, which is faster than "repeat with ..", doesn't work.
> repeat for ech line X in tData
>  if X = empty then delete  X
> end repeat

"repeat for each" is READ only, which means you cannot modify (or delete) the value in X in your case!
X in this case will hold the CONTENT of the line and not its line number!

Change it like this and it will work:
repeat for each line X in tData
   if X <> empty then 
     put X & CR after newData
  end if
end repeat
delete char -1 of newData
put newData into tData
## Or just use newData from now on...

> I use "repeat for each ..." in many handlers, but it doesn't work here and i don't see the difference.

See above...

> Last thing - the alphabetical question. Is the result of sorting Arabic text linesalphabetical indeed alphabetical?

Mark, Richmond? :-)

> Cheers again,
> Lars



Klaus Major
klaus at

More information about the use-livecode mailing list