Click to See Complete Forum and Search --> : reversing text


esthera
09-04-2003, 12:12 PM
I am trying to write a function that will take a string and reverse the text. The trick is the text is hebrew text and in order for it to displayed properly I need to reverse the text.
All the text has to be reversed line by line between <p> and </p> tags. word by word.
I need to check the ascii value of the word before it is reversed. I think the correct ascii i'm looking for is ascii 224-251 but if anyone knows different please tell me. I want to only switch the hebrew letters and not numbers or dashes of html.

So far I have the following:

aNews=split(newsitem," ")
for i=0 to Ubound(aNews)
'if asc(mid(aNews(i), 2, 1)) > 224 then
aNews(i)=strReverse(aNews(i))
'end if
next
newsitem=join(aNews," ")

Does anyone have any idea? Anyone with experience reversing hebrew text.

txmail
09-06-2003, 11:47 PM
Are you reversing words or just letters?